[NTLUG:Discuss] How to get mv to not report when there are no files?
Wayne Walker
wwalker at bybent.com
Sat Nov 10 20:51:37 CST 2007
I love linux/unix:
cd /home/johnc && ls | xargs -r mv --target-directory /var/www/html/incoming
On Tue, Nov 06, 2007 at 09:44:11AM -0600, Neil Aggarwal wrote:
> Hello:
>
> I have a cron job with this command:
> mv /home/johnc/* /var/www/html/incoming
>
> If there is a file in the /home/johnc directory, I get
> no output, but when the directory is empty, I get this
> notification to the root email account:
>
> mv: cannot stat `/home/johnc/*': No such file or directory
>
> This job runs every 5 minutes so this is annoying.
>
> Is there a way to supress that output?
>
> Thanks,
> Neil
>
> --
> Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
> Eliminate junk email and reclaim your inbox.
> Visit http://www.spammilter.com for details.
>
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
--
Wayne Walker
# Code comments are lies waiting to happen
wwalker at bybent.com Do you use Linux?!
http://www.bybent.com Get Counted! http://counter.li.org/
Perl - http://www.perl.org/ Perl User Groups - http://www.pm.org/
Jabber: wwalker at jabber.gnumber.com AIM: lwwalkerbybent
IRC: wwalker on freenode.net
More information about the Discuss
mailing list