bash - mv: invalid option -- '0' -


how can rename files "-" in front of filename, example: "-0001.jpg"

everyime try run:

for in *; mv "$i" "${i//-/}"; done 

or:

for in *; mv "$i" "${i#*-}"; done 

i got error:

mv: invalid option -- '0' try `mv --help' more information. 

thanks light!

mv ./-00008.jpg to/some/where.jpg    ^ - start path... 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -