mv: cannot stat error : No such file or directory error

Normally, when a glob which does not match any filenames is expanded, it remains unchanged. Thus, you get results like this: $ rm .bak rm: cannot remove `.bak’: No such file or directory To avoid this we need to change the default value of nullglob variable. Read more about it here: http://mywiki.wooledge.org/NullGlob Hope this helps!