From the course: Unix Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Moving and renaming files and directories

Moving and renaming files and directories - Unix Tutorial

From the course: Unix Essential Training

Start my 1-month free trial

Moving and renaming files and directories

- [Instructor] Let's learn how to move and rename files and directories in Unix. In the graphical user interface of an operating system, we usually use the mouse to drag files and folders around, but in Unix we'll use commands. I'm going to start out in my user home directory and I'll type ls, so we can see what files and directories are already there. And you can see that we created these files before, first_file.tx, we have lorem_ipsum.tx, my_project and second_file.txt. Those are the ones we're going to be working with here. Let's start by moving first_file.txt into the my_project directory. The way that we'll do that is with the mv command for move. So we're going to move. And then the second thing is the target. What do we want to move? Well, we want to move first_file.txt. Notice that I hit the Tab key to have it auto complete. Where do we want to move that target to? Well, we want to move it into my_project…

Contents