Super User is a question and answer site for computer enthusiasts and power users. 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 have untar wordpress. It creates a wordpress dir.

I want to move the files under this dir to dir but this doesn't work

mv wordpress/*

What's the syntax then ?


share|improve this question
It should work. What is the error message that you get? – ℝaphink Dec 26 '09 at 20:56
Did you create the '' directory beforehand? If you haven't, it will rename all the files to, and consequently, you will actually loose all your files. – ℝaphink Dec 26 '09 at 21:04
up vote 3 down vote accepted

The easiest way, if the '' directory doesn't exist yet, is actually to rename 'wordpress' into '':

$ mv wordpress

If '' already exists and you want to add the files from 'wordpress' to it, then:

$ mv wordpress/*

should do.

share|improve this answer
mydomain already exists. When I try it says cannot move wordpress/wp-content to a subdirectory of itself, '' ?!!! – asksuperuser Dec 27 '09 at 16:43
Hmm my target dir wasn't empty that is why :) – asksuperuser Dec 27 '09 at 16:49

you need to mkdir first before you run mv wordpress/*

share|improve this answer
But then he can just rename the folder. – ℝaphink Dec 26 '09 at 21:29

You must log in to answer this question.