In linux, you need to use a script to process files by time based on the last modification time. There is a basic usage related to find, such as the file size, type, and so on. this is about time. Three time periods for www.2cto. comlinux files (take find as an example): atime...
In linux, you need to use a script to process files by time based on the last modification time. There is a basic usage related to find, such as the file size, type, and so on. this is about time. For example, find: The Last access time of atime, such as ls and more. However, chmod, chown, ls, stat, and so on won't be modified, you can use ls-utl to view the last state modification time of ctime, such as chmod and chown, but the modification time does not change. you can use stat file to view the modification time; the last modification time of mtime content, such as after vi is saved. if the modification time changes, atime and ctime also change accordingly. in summary, ctime changes as long as the file is modified. Find. /-ctime-1 find the file modified in the current directory within one day. /-cmin-5 the number of rows of the modified css file in the current directory within 5 minutes is enhanced, and the number of rows of the modified css file in the current directory is found. /-cmin-20-name "*. css "| wc-l. sometimes, you do not want to search for certain subdirectories during the" find "operation, compare the single directory www.2cto.com find/web-path "/web/picture"-prune-o-name "*. jsp "two directories: find/web \ (-path/web/picture-o-path/web/p2 \)-prune-o-name "*. jsp "multiple directories find/web \ (-path/web/picture-o-path/web/p2-o-path/web/p3 \) -prune-o-name "*. jsp"
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service