File Processing Command
1. command Format: Command [-Option] [parameter] example: ls-la/etc Description: 1) Some commands do not follow this format. 2) If there are multiple options in the file, can be written together. 3) Simplified options and complete options. 2. directory processing command: ls command name: ls command Original English intent: list command path:/bin/ls execution permission: All Users Function Description: Display directory File Syntax: ls option [-aldhi] [file or directory]-a shows all files, including hidden files-l detailed information display-d if the parameter is a directory, only show its name, but not its file-I display the I node number of the file 3. directory processing command: mkdir command name: mkdir command Original Definition: make directories command path:/bin/mkdir execution permission: all user Syntax: mkdir-p [directory name] function description: create a new directory-p recursion example: mkdir-p/tmp/Japan/a Mkdir-p/tmp/Japan/c/tmp/Japan/B 4. directory processing command: cd command name: cd command Original English intent: change directory command path: shell built-in command execution permission: all user Syntax: cd [directory] Function Description: Switch directory example: cd/tmp/aa cd .. go back to the top-level directory. directory processing command: pwd command name: pwd command Original Definition: print working directory command path:/bin/pwd execution permission: all user Syntax: pwd Function Description: display the current directory 6. file Processing Command: rmdir command name: rmdir command Original Definition: remove empty directories command path:/bin/rmdir execution permission: all user Syntax: rmdir [directory name] function description: delete an empty directory: rmdir/tmp/aa/dd 7. directory processing command: cp command name: cp command original Syntax: copy command path:/bin/cp execution permission: all user Syntax: cp-rp [original file or directory] [target file]-r copy directory-p keep file attribute function description: copy a file or directory 8. directory processing command: mv command name: mv command Original English intent: move command path:/bin/mv execution permission: all user Syntax: mv [original file or directory] [target directory] Function Description: Cut the file and rename it. For example, mv a B renamed File a to B 9. directory processing command: rm command name: rm command Original Definition: remove command path:/bin/rm execution permission: all user Syntax: rm-rf [file or directory]-r Delete directory-f Force Execution Function Description: delete a file or directory 10. file Processing Command: touch command name: touch command path:/bin/touch execution permission: all user Syntax: touch [file name] Function Description: Create an empty file example: touch/root/aa Create File aa 11. file Processing Command: cat command name: cat command path:/bin/cat execution permission: all user Syntax: cat [file name] Function Description: display file content-n display row number example: cat-n/root/a 12. file Processing Command: more command name: more command path:/bin/more execution permission: all user Syntax: more [file name] (Space) or f flip (Enter) line feed Q or Q exit Function Description: displays the file content on a page, for example, more/etc/services 13. file Processing Command: less command name: less command path: usr/bin/less execution permission: all user Syntax: less [file name] (Space) or f flip (Enter) line feed Q or Q exit (page up) up page flip (one page) up arrow up a line/search keyword search you are looking for Content Function Description: show the file content by PAGE (turning up) Example: less/etc/services 14. file Processing Command: head command name: head command path: usr/bin/head execution permission: all user Syntax: head [file name] function description: display the first few lines of the file-n the specified number of rows. Example: head-n 20/etc/services 15. file Processing Command: tail command name: path of tail command: usr/bin/tail execution permission: all user Syntax: tail [file name] function description: show the last few lines of the file-n specified number of lines-f dynamic display of the end of the file content example: tail-n 20/etc/services 16. file Processing Command: ln command name: ln command Original Definition: link command path:/bin/ln execution permission: all user Syntax: ln-s [original file] [target file]-s: Create a soft connection. Function Description: generate a link file. Example: ln-s/root/a/root/B create a file's soft connection file B ln/root/a/root/c create a file's hard link file c soft connection features: features of hard links similar to windows shortcuts: 1) Copy cp-p + synchronously Update 2) identify through I Node 3) cannot cross-partition 4) cannot be used for directories: these are just common options for some common commands. Not all options for each command are listed.