Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 just want to know how this command works.

mv wordpress/* .

my guess is that it moves * meaning all files from wordpress folder to current folder. but still looking for proper answer.

share|improve this question
up vote 5 down vote accepted

Your assumption that this moves all files from the wordpress folder into the current folder you are in is correct. (the proper terminology for a "folder" is actually a "directory", but that's just semantics, the general idea is the same)

In command line, . indicates "This Directory", or rather the current directory you are in.

The mv command is the "move" command. The wordpress/* indicates that the folder you are inside has another folder called wordpress in it, and is directing the system to move all files and folders that are within the wordpress folder. The . command then indicates the destination, the directory you are in.

This command will move all files within the wordpress folder (which exists in the directory you are currently in) into the directory you are currently in, and will keep the structure of the files and directories through the move (so instead of wordpress/wp-admin it'll be in just wp-admin without the wordpress folder name prepended.)

If you want to know what the path is to the directory you are currently in before you run the command, just type pwd on the command line, and it'll tell you what the directory path you are currently in is. That'll be what . would be.

share|improve this answer

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.