Learn Linux Quickly
上QQ阅读APP看书,第一时间看更新

Moving one directory

You can also use the mv command to move directories. For example, if you want to move the directory d3 and put it inside d2, then you can run the mv d3 d2 command:

elliot@ubuntu-linux:~$ mv d3 d2
elliot@ubuntu-linux:~$ cd d2
elliot@ubuntu-linux:~/d2$ ls
d3

elliot@ubuntu-linux:~/d2$

Notice that you don't need to use the recursive -r option to move a directory.