Server Fault is a question and answer site for system and network administrators. 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 tried something on my vm ubuntu and managed to mess it up... luckily I made a snapshot not too long a go.

I renamed a file to ,,, and tried to mv ,,, *. The entire content of the dir disappeared. Can someone please explain to me what happened?

Thank you.

share|improve this question
+1 for a seriously "WTF" command. seewiously. ",,," is apparently a legal filename but just seems like a bad idea. Then lets move it to '*'. XD – Cory J Apr 17 '10 at 18:44
up vote 8 down vote accepted

The shell expands * into the entire contents of the current directory (modified by shell options). If the last entry in the current directory is itself a directory, then everything will be moved into that directory.

share|improve this answer
Awesome "what if" question :-) – Matt Simmons Apr 17 '10 at 18:50

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.