Random Linux Tips

Posted by Jemshad O K     Category: General

####[ GNU/ One Stanza Tip () ]#######################

Sub : Removing old files [#2] #646

Removing old files based on criterion of not being MODIFIED
within a stipulated time:
$ find <directory> -type f [-mtime +nnn] -exec rm -i {} \;
e.g. Deletes files in /var/adm directory and subdirectories
not accessed in the last 60 days:
# find /var/adm -type f -mtime +60 -exec rm -i {} \;

####[ ajitabhpandey (at) users.sourceforge.net ]##############

VN:F [1.6.3_896]
Rating: 6.0/10 (1 vote cast)
VN:F [1.6.3_896]
Rating: 0 (from 0 votes)
Tags: , , ,

Related posts