Linux command file processing command 1. file naming rule a. All characters except others are valid. B. It is best not to use some characters, such as space characters, tabs, escape characters, and characters @ & amp. C. avoid using the first character as a normal file name. D. file processing command for case-sensitive Linux commands 1. file naming rule a. All characters except/are valid. B. It is best not to use some characters, such as space characters, tabs, escape characters, and characters such. C. avoid using. as the first character of a common file name. D. case sensitive. 2. command FORMAT command format: Command-option parameter example: ls-la/etc description: 1) when there are multiple options, you can write them together. 2) two special directories,..., represent the current directory and the parent directory of the current directory. 3. 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 [-ald] [file or directory]-a shows all files, including hidden files-l detailed information display-d view directory properties 4. cd command name: cd command path: shell built-in command execution permission: all users function description: switch directory syntax: cd [directory] example: $ cd/switch to the root directory $ cd .. go back to the top-level directory 5. pwd command name: pwd command original definition: print working directory command path:/bin/pwd execution permission: all users function description: display the current working directory syntax: pwd example: $ pwd/etc/rc5.d 6. touch command name: Path of touch Command:/bin/touch. execution permission: all users. function description: create Empty file syntax: touch [file name] example: $ touch newfile 7. mkdir command name: mkdir command original definition: make directories command path:/bin/mkdir execution permission: function description for all users: create a new directory syntax: mkdir [directory name] example: $ mkdir newdir 8. cp command name: cp command original syntax: copy command path: /bin/cp execution permission: all users function description: copy a file or directory syntax: cp-R [source file or directory] [destination directory]-R copy directory example: $ cp file1 file2 dir1 copy file file1 and file2 to directory dir1 $ cp-R dir1 dir2 copy all files and subdirectories under dir1 to dir2 9. mv command name: mv command: path of the move command:/bin/mv execution permission: all user features: moving files, renaming Method: mv [source file or directory] [target file or directory] example: $ mv file1 file3 rename the file file1 in the current directory to file3 $ mv file2 dir2 move File file2 to directory dir2 10. rm command name: rm command original definition: remove command path: /bin/mv execution permission: all users function description: delete File syntax: rm-r [file or directory]-r delete directory example: $ rm file3 delete file file3 $ rm-r dir1 delete directory dir1 11, rmdir command name: rmdir command original definition: remove directory command path:/bin/rmdir execution permission: function description of all users: delete empty directory syntax: rmdir [Directory] example: $ rmdir dir1 delete empty directory dir1 note: rmdir command can only delete empty directory, if there are files or subdirectories in the directory, this command cannot be executed, so it is rarely used.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service