[NTLUG:Discuss] How to get mv to not report when there are no files?

Rick Renshaw bofh69 at yahoo.com
Tue Nov 6 18:16:18 CST 2007


--- Neil Aggarwal <neil at JAMMConsulting.com> 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


Easiest way would be 
mv /home/johnc/* /var/www/html/incoming > /dev/null



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Discuss mailing list