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-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time https://shivanandarao-oracle.com/2012/12/05/rman-20207-until-time-or-re...