Linux: Move files and directories up one directory

Here’s a quick answer to a Linux CLI question that I am asked on a regular basis. The scenario goes like this. You just unpacked a gzip’d file and you have a directory full of files and directories now. You don’t want those files and directories in that directory but rather up one directory…what do you do. First thing you can do is to cd into the directory and then you can either:

Copy the files/directories up one directory by running: cp * ../

or you can…

Move the files/directories up one directory by running: mv * ../

About Bruce

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

You must be logged in to post a comment.