jjcheap1
asked on
House Keeping Script
Hi,
I need a script to go through /home/ALL THE USERS/public_html/ftpbacku p and delete all files that are 2 weeks or older. Then I will make this script a cron job.
ALL THE USERS are users home directories.
Thanks
Scott
I need a script to go through /home/ALL THE USERS/public_html/ftpbacku
ALL THE USERS are users home directories.
Thanks
Scott
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
// Note the "&& echo "${args}"" bit should be changed to read " && rm -f "${args}"" if you're satisfied it works.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks,
The script runs through about 30 users and throws out this
./xx.sh: line 3: syntax error near unexpected token `|'
./xx.sh: line 3: `| while read dir; do find "${dir}" -type f -printf '
Any suggestions?
Thanks
Scott
The script runs through about 30 users and throws out this
./xx.sh: line 3: syntax error near unexpected token `|'
./xx.sh: line 3: `| while read dir; do find "${dir}" -type f -printf '
Any suggestions?
Thanks
Scott
most likely \ is not the last character in line 2