A command like mv foo* ~/bar/ produces this message in stderr if there are no files matching foo*. mv: cannot stat `foo*': No such file or directoryHowever, in the script I'm working on that case would be completely fine, and I'd like to omit that message from our logs. Is there any nice way to tell mv to be quiet even if nothing was moved?
Is there a way to make mv fail silently?
bash;mv
Are you looking for this? $ mv  file dir/mv: cannot stat file: No such file or directory$ mv  file dir/ 2>/dev/null# <---- Silent ----->