1, the login: login the system user
2, logout/exit: cancellation system user login
3, passwd: modify the password
4, the PWD: display the current directory or the current working directory
Commonly used commands:
A, ls
1, ls: list all files in the current directory and subdirectories, does not contain hidden files
2, the ls - a: list all files in the current directory and subdirectories, including hidden files
3, the ls -l: lists the current directory for detailed information on all files and subdirectories
4, ls -r: list all files in the current directory in recursive way all files and subdirectories
5, ls combination:
[ls - al]
[ls - aR]
[ls - la]
[ls - lR]
[ls - Ra]
[ls - Rl]
[ls - alR]
[ls - aRl]
[ls - Ral]
[ls - Rla]
[ls - laR]
[ls - lRa]
Second, CD
1, CD: enter the specified directory (common)
2, CD. () function returns the current directory
3, CD.. : back to the parent directory
4, CD ~ : return system user home directory (root) (common)
3: the wildcard
* : omit more characters
? : only omit a character
Four: file operations
1, the mkdir DirectoryName: create a directory
2, the rmdir DirectoryName: delete the directory
The PWD:
Show the current full path to the file information
Rm: delete the current directory files (remove files)
1, the rm -i (interactable) FileName: interactive to delete the specified file
2, the rm -f (force) FileName: mandatory delete specified file
3, the rm - r FileName: subdirectories recursively deletes files
Cp: copying files (copy files)
1, cp oldfilename newfilename
Cp old file name the new file name (copied into the same directory, needs a new file name)
2, cp filename/directoryname/
Cp file directory name (full path to the directory) (copy to another directory)
3, cp -i oldfilename newfilename
If the same name, prompt confirmation,
4, cp - r/../olddirName/../newDirName
Copy directory (folder)
Mv: move files (move files)
1, mv oldfilename newfilename
Used to change name, the same directory is equivalent to rename a file,
2, the mv filename directoryname
Move the file to another directory,
3, mv -i filename directoryname
Mobile sometimes remind, if you have a file with the same remind whether replacement,
4, mv dirname directoryname
Mobile path To 1 under the directory path under 2
Five: screen clearing
CIear (the clear screen) :
Sclear CLS (screen updates to the next screen, ensure that vision)
CodePudding user response:
Learning, thanks the original posterCodePudding user response:
Lz, and support