Link to home
Start Free TrialLog in
Avatar of washy16
washy16Flag for Canada

asked on

Crontab ignoring $(date +%F_%T) output filenaming

I'm trying to get cron to output to a file with the current date/time in it, but I'm getting EOF errors mailed to me. If I enter the full command on the command line, it works perfectly.

Here is an example to make it a bit clearer:

10 * * * * find / -perm -u=s 1> /root/$(date +%F_%T)_SUID

Any help would be greatly appreciated.

Thanks,

W.
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of washy16

ASKER

@ woolmilkporc:  Thanks a lot. That would perfectly.

@tintin: I read the man pages more than once. I can't beleive I missed that part. Thanks!
Avatar of washy16

ASKER

typo in previous comment: would = worked  :)

Thanks again!