Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why my mv command does not work in crontab

Status
Not open for further replies.

sismic

IS-IT--Management
Nov 29, 2007
4
AU
I am wondering if you guys could shed a light what was wrong on the following command.


/usr/bin/find /testcron/SessLogs -name "list.log.*" -exec /usr/bin/mv {} /testcron/SessLogs_archive \;

I try to move all list.log.* file, this command works interactively but not on cronjobs.

Any suggestion what should i do?
 
I'd put the find command in a shell script file (man vi), make the script file executable (man chmod) and schedule that script in crontab instead of the command itself.


HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top