1.Linux directory structure is a tree structure, the topmost directory is the directory "/", the other directory by Mount can add it to the directory tree, by lifting the mount to remove them.
2. Absolute path and relative path
- Absolute path notation: written by the root directory "/", for example:/usr/share/man this directory;
- Relative path notation: not written by "/", for example, to be transferred from/usr/share/man to/usr/share/doc, can be written as: CD. /doc. However, it is worth noting that if I want to jump from the directory "/" to "/usr/share/man", directly written: CD. /man is not going to work. Such as:
3. Common file and Directory management commands
- LS: List directory
- CD (change directory): Switch directory
- PWD (Print working directory): Displays the directory where you are currently located
- mkdir (Make directory): Create a new directory
[[email protected] Desktop] # Mkdir/lijiaman/ * ERROR notation */[[email protected] Desktop]# lscmd new file new File~[root@linuxforlijiaman Desktop]# mkdir lijiaman/ * correct notation */[[email protected] Desktop ]# lscmd lijiaman new file new file~
- RmDir: Delete Empty directory
[[email protected] Desktop] # ls cmd lijiaman new file new File~[root@linuxforlijiaman Desktop]# rmdir Lijiaman [[email protected] Desktop]# lscmd new file new file~
- CP: Copying Files and directories
- RM: Removing Files and directories
- MV: Moving files and directories
[Linux] Linux Learning Notes (5)-File and directory management