Tuesday, May 26, 2020

Linux : Delete files from time stamps.

https://www.unix.com/shell-programming-and-scripting/24911-how-delete-files-unix-using-shell-script.html

$ find /path/to/directory -mtime -5 -ok rm -f {} \;

Piping the previous command into wc

$ find /path/to/directory -mtime +5 -ok rm -f {} \; | wc -l

No comments:

Post a Comment

 RMAN Recovery Catalog About Recovery Catalog RMAN recovery catalog Is another database which is out of your normal databases or which is o...