Summary of Common Linux commands

Source: Internet
Author: User

1. View and modify file permissions (1) view file details, including permissions

Command: Ls-l

    • The first character represents the file type: D represents the directory,-represents a non-directory.
    • The next 9 characters, each of three, represent the permissions of the owner of the file, the permissions of the same group of users, and the permissions of other users. R means have Read permission, W means write permission, x indicates execute permission,-Indicates no permission.
    • The next number represents a reference count.
    • The next two names are the file owner and the owning user group, respectively.
    • The next number indicates the file size, in bytes.
    • The next three columns are time: months-days-hours.
    • Finally, of course, the file name.
(2) Modify file permissions

command example: chmod 754 nohup.out

    • 4 represents Read permission, 2 for Write permission, and 1 for execute permission.
    • 7 = 4 + 2 + 1, which indicates a readable writable executable permission; 5 = 4 + 1, which means that you have read executable permission but no write permission; 0 means no permissions.
    • The three numbers correspond to the rights of the file owner, the owning user group, and other users.
2.ls Command Usage Summary (1) Common parameter meanings
    • Without parameters: Lists all filenames under the directory by default
    • -L: List details of directories and files (note, LL equals Ls–l)
    • -A: List everything under the directory, including hidden
    • -T: Sort by last modified time
    • -S: Sort by file size (S in uppercase)
    • -r: Sort by reverse order
    • -S: List file sizes

Summary of Common Linux commands

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.