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

Wayne Walker wwalker at bybent.com
Sat Nov 10 20:53:56 CST 2007


On Tue, Nov 06, 2007 at 04:16:18PM -0800, Rick Renshaw wrote:
> --- Neil Aggarwal <neil at JAMMConsulting.com> wrote:
> Easiest way would be 
> mv /home/johnc/* /var/www/html/incoming > /dev/null

That will still generate output (error messages go to file descriptor 2,
aka stderror)

mv /home/johnc/* /var/www/html/incoming 2> /dev/null

will work, BUT will fail to notify you if something goes wrong.

-- 

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