Categories
GNU/Linux

GNU/Linux Find and Remove Old Files From Directory

You can use find to script removal of old backup or logfiles from a specific directory. The example below removes all files from a directory that are older than 14 days.

find /var/local/ucs/*.ucs -type f -mtime +14 -exec rm {} \;