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


You are removing a file with an & character in the name, and the rm command is being put in the background. (For the record, the 1 is the job number, and the 12345 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.

  • 6
    Eh, there's really nothing else that could reasonably cause a message in that format to be printed. – Random832 Jun 3 '11 at 19:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.