First, the directory of the Switch command
cd usr means switch to the USR directory in this directory
CD.. / switch to the previous level directory
CD/ switch to the system root directory
CD ~ switch to user home directory
CD- back to the previous layer
Second, the operation of the directory command
1. Add Directory Operations
Command: mkdir directory name
For example, create a test directory under the root directory: Mkdir/test
2. View Directory Operations
LS View file directory
Ls-a Show hidden files
Ls-l abbreviated LL displays detailed file information for the catalog file.
3. Find a Directory
Find Directory Parameters
Example: Find the catalog file associated with test/root under Find/root-name ' test* '
4. Modify the name of the directory
MV Directory name new directory name
Example: Renaming an AAA directory under the test directory to NEWTEST:MV AAA newtest
NOTE: The MV syntax can not only rename files, but also rename various file compression packages.
5. Location of the Mobile directory
The new location of the MV Directory name directory
6. Cut files
The new location of the MV Directory name directory
7. Copy Directory
Command: Cp-r directory name directory copy target location---------R for recursive copy
Example: Copy the newtest under/usr to test in the root directory cp-r/usr/newtest/test
Note: The CP can also be used for files, and the copy of the compressed package can now be used without the-R
8. Deleting a directory
RM-RF directory forced to delete files directory
Operation of the Linux directory