Linux finds files by time

Source: Internet
Author: User

Linux finds files by time

Requires a script that is processed according to the last modification time.

Here's a basic use of find, depending on the size of the file, the type, or the time.  linux file three time (in the case of Find):  atime Last access time, such as LS, more etc., but chmod, chown, LS, stat, etc. will not be modified for some time, using Ls-utl can be checked in this time sequence  ctime the last state modification time, such as chmod, Chown and other state time changes but the modification time will not change, using stat file can be viewed;  mtime the last time the content was modified, such as VI save, etc., change time changes , Atime and CTime also corresponding change .  , as long as the document has been modified, then the CTime will change.  find./-ctime-1 files that have been modified within one day of the current directory  find./-cmin-5 The current directory modified files in 5 minutes    re-enhanced, statistics the current directory in 20 minutes modified CSS file line number  find./-cmin-20-name "*.css" |wc-l   then sometimes you don't want to find some subdirectories, slices   single directories Find/web-path "/web/pict Ure " -prune-o-name" *.jsp "  two directories  find/web \ (-path/web/picture-o-path/web/p2 \)-prune-o-name" *.J SP "  multiple directories  find/web \ (-path/web/picture-o-path/web/p2-o-path/web/p3 \)-prune-o-name" *.jsp "

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.