find . -type f -name *.log -mtime +1 -mtime -8 -exec rm -f {} \;
type f =its for file
-mtime +1 = modified time greater than 1 day.
-mtime -8=modified time less than 8 days.
-exec = executes a following commands here its removal of *.log files
type f =its for file
-mtime +1 = modified time greater than 1 day.
-mtime -8=modified time less than 8 days.
-exec = executes a following commands here its removal of *.log files
No comments:
Post a Comment
Your suggestions please