get rid of files and directories with spaces in them

Frank Cox theatre at sasktel.net
Sat Jul 21 02:49:55 UTC 2007


On Fri, 20 Jul 2007 21:37:12 -0500
Scott Berry <sberry at northlc.com> wrote:

> How does one get rid of files and directories with spaces in them?  I tried 
> rm and it doesn't want to remove the files or folders?

Put a \ in front of the space to "escape" it.

So if you have a file name like this:

file name.txt

You can delete it like this:

rm file\ name.txt

You can "escape" other characters that would otherwise have special meaning
(brackets, apostrophes, and the like) in the same way.


-- 
MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com




More information about the fedora-list mailing list