Transferred from: http://blog.csdn.net/hardwin/article/details/7711635
Move the file below the current directory (excluding directories) to/opt/shell
Find. -type f-exec mv {}/opt/shell \;
Find. -type F | Xargs-i ' {} ' mv {}/opt/shell
Below from http://weiruoyu.blog.51cto.com/951650/832497
Find how many days ago files, moved by time, and packaged in batches
Show Top 10 files
[Email protected] smgpbi]# Ls-1 | Sort-u | Head-10
1. First look at the number of files, enter the location of the file
# Find. -name "*" | Wc-l
Or
# ll |grep "^-" |wc-l
2. View the number of files
See the number of files for 120 days
# Find. -mtime +120 | Wc-l
Generally if it is a small file, control at about 10.2 million.
Explanation:-mtime +30--Setup time is 30 days ago;
-exec MV-Perform the move operation after the search is completed;
3. Move to the specified directory by time
# Find. -mtime +90-exec mv {}/var/tmp/date_90 \;
4. Calculate the size
# du-sh date_90
Size general control in 10-15g best
5. Compress and Package
#tar-ZCVF date_90.tar.gz date_90/
Linux file Movement