Skip to main content

Thread: rm command (with warning)


i had directory containing duplicate files, filename containing (copy), e.g. a4-prices.pdf , a4-prices (copy).pdf

rid of copies, ran command (don't try @ home, kids!)
code:
rm * (copy) *
which deleted files in directory (leaving directories).

question is, why?

because of spaces. delete *, (copy) , again *. first *, deleted. need escape spaces backslash:

code:
rm *\ (copy)\ *
or using quotes

code:
rm "* (copy) *"
maybe need escape brackets too, don't know sure. can try rm command using ls instead of it.


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support New to Ubuntu [ubuntu] rm command (with warning)


Ubuntu

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support