Monday, 6 July 2015

Delete files older than a particular period

Files that are older than a particular day can be deleted easily with a one line command. For example, the following command will delete files older than 30 days in the path /tftpboot/:

#fine /tfptboot/* -mtime +30 -exec rm {} \;