CRTL + L: Clear screen
CRTL +c: Terminating operation
1. Show directory commands
ls: Show directory file
Ls-a: Show all files, including hidden files
Ls-l: Detailed information display,
LS-LH: Show details, including file size
ls-d: Viewing directory properties
LS/ETC: Viewing files in the directory
-rw-r--r--: File Type U permissions-G permission-Other people permissions
R Read W write X Execute
File type:-binary file D directory l soft link file
U owner G-owned group O other person
2. Working with directory commands
mkdir: Create directory, make directories
Mkdir-p Recursive creation
Example: Mkdir-p/tmp/japan/boduo
Mkdir/tmp/japan/longze/tmp
3. Directory Switching commands
CD: Switch directories
Example: Cd/tmp/japan/boduo
Cd..
CD./japan
.. Represents the parent directory,. Represents the current directory
4. Show current directory: PWD
5. Deleting a directory
RmDir: Delete Empty directory
6. Copying Files or directories
CP-RP [Original file directory] [target directory]:-r copy Directory-p hold file properties
7. Cut file, rename: MV
MV [original file or directory] [target directory]
In the same directory, for renaming
8. Delete Files: RM
RM-RF [File or directory]:-R Remove Directory-F Enforcement
Delete the directory with-RF, or you will be constantly prompted to delete every file in the directory
9. Create an empty file: Touch
Touch japanlove.list
10. Display file contents: Cat [FileName]
-N: Show line numbers
11. Display file contents: TAC [FileName]
12. Paging Displays the contents of the file: more [filename]
(space) or F: Page turn
(Enter): line break
Q or Q: Exit
13. Paging Displays the contents of the file (page UP): less [filename]
PageUp: Page Up
↑: Go up one line
/Search Keywords: search, press N to find the next match location
14. Display the previous lines of the file: head-n number [filename]
15. Display the previous lines of the file: tail-n number [filename]
-F: Dynamic display of File end content
No-N: Default display of 10 rows,
16. Generate Link File: ln [original file] [target file]
-S: Generate soft Links
Soft Links: (similar to Windows shortcuts)
①. Permissions are rwxrwxrwx
②. File size-just symbolic link
③. Arrow pointing to source file
Hard-Link Features:
①. Copy cp-p + synchronous update
②. Can view I node recognition by-I
③. Cannot span partitions
④. Cannot be used for directories
2016/8/18 Linux Common commands: directory, file processing commands