I'm trying to remove a file and I keep getting a message similar to:
[1] 12345
and nothing happens, I run a directory search (dir) and the file remains and I get a stopped message
command linefilenamesrm
I'm trying to remove a file and I keep getting a message similar to:
[1] 12345
and nothing happens, I run a directory search (dir) and the file remains and I get a stopped message
Best Answer
You are removing a file with an
&
character in the name, and the rm command is being put in the background. (For the record, the1
is the job number, and the12345
is the process ID)It is important to quote or escape any filenames that contain special characters. A good rule of thumb is: if you think something might be a special character, it can't hurt to quote. Just put
'single quotes'
around the whole filename, unless it contains a single quote mark - then it gets more complicated. You could also (instead of quotes) put a backslash\
before every special character (including any backslashes the filename may contain) Though, if you tab-complete the shell will quote or escape anything that actually is a special character for you.