Linux common commands (i)

Source: Internet
Author: User

Command: LS (list)
Permissions: All users (then all users, if not shown thereafter)
Description: Show file directory
Syntax: LS option [-al] [file or directory]
A: Show all files, including hidden files
L: Show detailed information

Command: Touch
Syntax: touch [filename]
Description: Create an empty file

Command: mkdir
Syntax: mkdir [-p option means recursive create folder] [folder name]

Description: Create a folder

Command: CP (copy)
Syntax: CP [source file] [target file]
cp-r [Source directory] [target directory]
Description: Copying a file or directory

Command: RM (remove)
Syntax: rm-f [file]
Rm-r [Catalogue]
RM-RF [directory, including content under directory]
Description: Delete a file or directory

Command: Cat
Syntax: Cat [file name]
Description: View the contents of the file (as too much, the content may not be complete)

Command: More
Syntax: more [file name]
Description: View the contents of a file to fully display
Usage: Use space to page, enter to display the next line, Q exit (or CTRL + C)

Command: Head

Syntax: head-number [file name]

Description: View the number of lines before a file

Command: Tail

Syntax: tail-number [file name]

Description: View the number of lines after a file

MV 1 Ability to modify file names: MV [source file name] [new file name]

2 Move File location: MV [source file name] [new file location + new file name]

Command: chmod

Syntax: chmod [{ugo}{+-=}{rwx}] [file or directory]

chmod [mode=421] [file directory]

Description: Change permissions for a file or directory

Linux common commands (i)

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.