Re: Fwd: Cron <root@hXXXXXX> tar cfCz /root/backups/htdocs-`date +

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



That was it - I've escaped the % with a \

Thank you Sjoerd!

On 10/6/06, Sjoerd Mullender <sjoerd@xxxxxxx> wrote:
On 2006-10-06 14:48, Alexander Farber wrote:
> could someone please advise me, why would
> my tar-command work fine on the command line:
>
> hXXXXXX:afarber {272} sudo tar cfCz /root/backups/htdocs-`date
> +%F`.tgz /var/www/htdocs .
> hXXXXXX:afarber {273} sudo ls -l /root/backups
> -rw-r--r-- 1 root root 1087070 Oct  6 14:43 htdocs-2006-10-06.tgz
>
> But fails in the root's crontab:
>
> hXXXXXX:afarber {274} sudo crontab -l
> 3       3       *       *       *       tar cfCz
> /root/backups/htdocs-`date +%F`.tgz /var/www/htdocs .

The percent is special in a crontab command.  Check the manual (man 5
crontab).

--
Sjoerd Mullender

--
http://preferans.de

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux