Friday, January 24, 2014

Command to clear 15 days old data or files + LInux

Command to list 15days old files.

# find /sftp/home/ \( ! -regex '.*/\..*' \) -type f -mtime -15 -exec ls -l {} \;

Command to remove 15 days old files.


# find /sftp/home/ \( ! -regex '.*/\..*' \) -type f -mtime -15 -exec rm -rf {} \;


No comments:

Post a Comment