Can anyone help me with a shell script to remove all files (log files) created 7 days before current system date.
TIA,
Kiran.
Can anyone help me with a shell script to remove all files (log files) created 7 days before current system date.
TIA,
Kiran.
Sorry a bit of google helped me to write the following.
#!/bin/bash
/usr/bin/find / -name *.log -ctime +7 -exec /bin/rm -f {} \;