Introduction of command basic format with ls command as an example

Source: Internet
Author: User

First, the command format

command [options] [parameter]//[] indicates optional

Note: Individual command use does not follow this format

When there are multiple options, you can write them together

Simplified options and complete options, such as-a equals--all

Ii. Examples of commands

Querying the contents of the directory: LS

ls [options] [file or directory]

Options:

-a displays all files, including hidden files

-L Show details (equals command ll)

-D View Directory properties

-H humanized Display file size

-I display Inode

Use the command ll or ls-l to display the file details

Third, ll or Ls-al command see the description of the file details

<1> The first column represents the permissions for the file, for example:-rw-r--r--., default is 10-bit

<1> The first bit represents the file type, there are 3 kinds of common (-normal file D directory l soft link file), a total of 7 kinds

The remaining four are block device files, character device files, socket files, and pipeline files, which are special files of the system and are generally not recommended for users to operate

For example, a device file is saved in the Dev directory, and Ls/dev can see a file type that starts with C

<2> the remaining 9 bits per three-bit group representing the owner of the file, the user group, and other users ' permissions

Users who want to have the same permissions are typically placed in a user group (note that a user can belong to more than one user group)

Owner U, group G, other person O, R Read, w write, X Execute

<3> last. Delegate ACL permissions (Centos 6 appears later, I don't see it in Ubuntu.)

<2> The second column is a number that represents the reference count of the file, which is called several times on behalf of the file and is reflected in the hard links

<3> The third column represents the owner of the file

<4> Fourth column represents the group to which the file belongs

<5> Fifth Column size of the file, in bytes (B), using the parameter-H can be displayed in the appropriate units, such as K,m,g

<6> Sixth column The last modified time for this file

<7> last column File name

Four, ls parameter introduction

-a displays all files, including hidden files, that are hidden in Linux with the. Start

-L Query Details

-D View directory properties, such as ls-d/etc, which shows the permissions of the/etc directory itself rather than the contents of the/etc directory

-H humanized Display

-I displays the inode of the file

    

        

Introduction of command basic format with ls command as an example

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.