Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 14 down vote accepted

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.

share|improve this answer
+1. Impressive piece of deduction. – Faheem Mitha Jun 3 '11 at 19:51
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 posting your answer, you agree to the privacy policy and terms of service.

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