Common command of Linux learning ls

Source: Internet
Author: User
Tags syslog

command format and directory processing command LS

command format : command [- options ] [ parameters ]

For example : ls-la/etc

Description :

1) Individual command use does not follow this format

2) when multiple options are available, they can be written together

3) Simplified and complete options

-A equals --all

PS: In Linux ". "represents a hidden file.

Directory processing command:ls

Command name :

Ls

Command English original :

List

Command path :

/bin/ls

Execute permissions :

All Users

Function Description :

displaying catalog files

Syntax :

LS option [-ald][ file or directory ]

-A displays all files, including hidden files

-L Detailed information display

-D View Directory properties

#ls -A View the files in this directory ( contains hidden files )

#ls-L Show file Details

1 root root 1208 3 06:22 anaconda-ks.cfg

1 root root 24772 3 06:22 install.log

1 root root 7690 3 06:21 install.log.syslog

Root owner   Root belongs to group 7690 File size

The following Ls-lh is to turn the byte display of the file size into a familiar Windows

1.2K December  3 06:22 anaconda-ks.cfg-rw-r--r--. 1 root root  25K December  3 06:22 install.log-rw-r--r--. 1 roo T root 7.6K December  3 06:21 install.log.syslog

1.2K and 7690 represent a meaning, except that when using LS-LH, the file size becomes the familiar K, M, g representation rather than the byte representation.

-rw-r--r--

- file Type (- binary file D indicates directory l indicates soft link file )

rw-r--r--

U g o

U owner G - owned group o other person

Ps:r Read W write x Execute

[Email protected] ~]# ls-lhd/etcdrwxr-xr-x. 102 root root 12K December 06:36/etc

ls-lhd/etc is to view etc the size of the directory rather than the view ect all content under the directory.

[Email protected] ~]# ls-i795111 anaconda-ks.cfg  786436 install.log 786437  install.log.syslog

#ls-I. view each file's ID number

Common command of Linux learning ls

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.