how to tell if a file is older than 30 days?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



From: Jerry Geis [mailto:geisj@xxxxxxxxxxxxxxx]
> 
> I am trying to find out how to tell if a given file is 30 days or older.
> How is that type of thing done in shell scripts.

find directoryname -mtime +30 -print

Will list all files in a directory that have not been modified in the last
30 days.

Read the man page for 'find'.  It can find files based on almost anything.

Bowie

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux