LS command details

Source: Internet
Author: User

The LS command is the most commonly used command in Linux. The LS command is short for list. By default, LS is used to print the list of the current directory. If ls specifies other directories, the list of files and folders in the specified directory is displayed. By using the LS command, you can view not only the files contained in Linux folders, but also the File Permission (including the directory, folder, and file permission) to view the directory information.

Ls


[[Email protected]/] # ls-l

Total 102

Dr-XR-X. 2 root Root 4096 Jul 12 14:47 Bin


-L: long format

File Type:

-: Common file (f)

D: directory file

B: block Device Files)

C: character device file (character)

L: Symbolic Link file)

P: Command pipeline file (PIPE)

S: Socket File)

File Permission: 9 bits, each 3 bits, each group: rwx (read, write, execute), r --

Number of file hard links

File owner)

File Group)

File size (size), in bytes

Timestamp: The last modification time.

Access: Access

Modify: Modify. The file content has changed.

Change: Change, metadata, metadata


[[Email protected]/] # ls-lH

Total 102 K

Dr-XR-X. 2 root Root 4.0 K Jul 12 Bin


-H: converts units.


[[Email protected]/] # ls-

... Autofsck bin boot. Reset Dev etc home lib lib64 lost + found media misc mnt net opt proc root sbin SELinux SRV sys TMP u01 USR VaR

-A: displays hidden files starting ".".

. Indicates the current directory

.. Indicates the parent directory


[[Email protected] Home] # ls-LD

Drwxr-XR-X. 5 root Root 4096 Jul 12 13:43.

-D: displays the directory attributes.


[[Email protected] Home] # ls-I

1715907 DVD 1717852 Oracle 1578497 xiaolai


-I: Index node, inode


[[Email protected]/] # ls

Bin boot Dev etc home lib lib64 lost + found media misc mnt net opt proc root sbin SELinux SRV sys TMP u01 USR VaR

[[Email protected]/] # ls-R

VaR USR u01 TMP sys SRV SELinux sbin root proc opt net mnt misc media lost + found lib64 lib home etc Dev boot Bin

-R: reverse display


-R: recursive display


This article from "stick to your dreams" blog, please be sure to keep this source http://xiaolai0528.blog.51cto.com/2366992/1531738

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.