3. 使用find命令查找大于指定大小的文件:find命令可以根据文件的大小来搜索文件。要查找大于指定大小的文件,可以使用”find /path -size +Nc”命令。其中,”/path”是要搜索的路径,”N”是用于指定文件大小的整数值,”c”表示以字节为单位。 4. 使用grep命令查找大于指定值的行:grep命令用于搜索文件中包含指定模式...
[root@localhost ~]#find /mnt/hgfs/ -type l –print 查找链接文件 8、在跟目录下查找xml扩展名属于用户admin其大小为0的普通文件并删除 [root@localhost ~]# find / -name "*.xml" -user admin -type f -size 0 –print –exec –rm {} \; 9、查找非目录文件 [root@localhost ~]#find / !-t...
# find / -type f -name *.zip -size +100M -exec rm -i {} /;" Remove all *.tar file that are over 100M using the alias rm100m (Remove 100M). Use the similar concepts and create alias like rm1g, rm2g, rm5g to remove file size greater than 1G, 2G and 5G respectively. # ...
# find / -type f -name *.zip -size +100M -exec rm -i {} \;" 1. Remove all *.tar file that are over 100M using the alias rm100m (Remove 100M). Use the similar concepts and create alias like rm1g, rm2g, rm5g to remove file size greater than 1G, 2G and 5G respectively....
changed in the 4.3.x release series. The findutils test suite runs all the tests on find at each optimisation level and ensures that the result is the same. EXPRESSIONS Theexpressionismade up ofoptions(which affect overall operation rather than the processing of a specific file, and always ret...
[root@getlnx01 u03]# find . -type f -size +800M ./flash_recovery_area/backup/backupsets/ora_df873519197_s46815_s1 ./flash_recovery_area/backup/backupsets/ora_df873523646_s46822_s1 ./flash_recovery_area/backup/backupsets/ora_df873521714_s46818_s1 ...
find . -size +100M -size -2G You may also combine the size search with the name search. For example, to search for all files with name ending in .log but size greater than 500 MB in the root directory, you can use: find / -size +500M -name "*.log" ...
[root@getlnx01 u03]# find . -type f -size +800M -print0 | xargs -0 ls -l -rw-r--- 1 oracle oinstall 2782846976 Mar 6 11:51 ./flash_recovery_area/backup/backupsets/ora_df873513413_s46809_s1 -rw-r--- 1 oracle oinstall 1878433792 Mar 6 11:53 ./flash_recovery_area/backup/ba...
find . -newer backup.tar.gz Finding Files by Size The -size option finds files that meet the size criteria specified. To find all user files larger than 5MB, use Copy Copied to Clipboard Error: Could not Copy find / -size +5000000c 2> /dev/null ...
find -size 1000c 3.6 head 命令 head 用来显示档案的开头至标准输出中,默认 head 命令打印其相应文件的开头 10 行。 常用参数: -n<行数> 显示的行数(行数为复数表示从最后向前数) 实例: (1)显示 1.log 文件中前 20 行 head 1.log -n 20 (2)显示 1.log 文件前 20 字节 head -c 20 log...