可以使用find命令结合du。例如,找出当前目录及子目录下大于10MB的文件夹:
Search for files in your home directory which have been modified in the last twenty-four hours. This command works this way because the time since each file was last modi- fied is divided by 24 hours and any remainder is discarded. That means that to match -mtime 0, a file will have ...
Traverse the filesystem just once, listing setuid files and directories into/root/suid.txt and large files into /root/big.txt.find$HOME -mtime0Searchforfilesinyour home directorywhichhave been modifiedinthelasttwenty-four hours. This command works this way because thetimesince eachfilewaslastmodi...
Using colortodistinguishfiletypesisdisabled both bydefaultandwith--color=never. With --color=auto, ls emits color codes only whenstandard outputisconnectedtoa terminal. The LS_COLORS environmentvariablecan change the settings.Usethe dircolors commandtoset it.Exitstatus:0ifOK,1ifminor problems (e.g...
find 命令语法格式: $ find <path> {file-or-directory-name} <options> <action-on-result> <action-on-result> 可选项: –delete : 删除文件或目录 -exec command {}\; : 根据 find 命令的结果执行命令 -ok command : 它将运行与 -exec 相同的命令,但它将在实际执行之前提示 (1) 查找当前工作目录...
1. Find File Size in Linux Using the du Command The du (Disk Usage) command in Linux is one of the most common tools to find the size of a file. Let's apply this command to find the size of our test file. Run the following command: du -sh testfile.txt In this command, the...
[root@centos7 ~]# parted /dev/sdb GNU Parted 3.1 Using /dev/sdb Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) help #帮助信息 align-check TYPE N check partition N for TYPE(min|opt) alignment help [COMMAND] print general help, or help on COMMAND mklabel,...
...内部命令获取帮助信息:#help COMMAND 外部命令获取帮助信息: (1)使用手册(manual):#man COMMAND 存放路径:/usr/share/man (2)#COMMAND –help...一些常用的函数(function)与函数库(library),大部分是C的函数库(libc) 4装置档案的说明,通常在/dev下的档案 5设定档或者是某些档案的格式 6游戏(games) 7...
Shell是一个程序,提供一个与用户对话的环境。这个环境只有一个命令提示符,让用户从键盘输入命令,所以又称为命令行环境(command line interface,简写为CLI)。Shell接收到用户输入的命令,将命令送入操作系统执行,并将结果返回给用户。 Shell是一个命令解释器,解释用户输入的命令。它支持变量、条件判断、循环操作等语法,...
file by assuming it is encoded in fromEncoding and converting it to toEncoding. find . -maxdepth 1 -name *.jpg -print -exec convert "{}" -resize 80x60 "thumbs/{}" \; batch resize files in the current directory and send them to a thumbnails directory (requires convert from Imagemagick...