Simple Linux Command Line Note 1: ls

Source: Internet
Author: User
Tags color identifier

Concise Linux Command Line Notes 1: ls lsls is the abbreviation of list, the main function is to view the Directory and file information 1. usage: ls [Option]... [file]... 2. common parameters:-a, -- all: display all files, including hidden files (that is, the front. -all: displays all files and detailed information in a list.-l lists information in a long format, that is, the specific information of the file (owner, permission, etc) -n is similar to-l, but UID and GID are listed in reverse order.-r recursively displays subdirectories.-S is sorted by file size.-t is sorted by modification time, the newly modified items are listed in front-x row by row instead of column by column-X sorting by extension-1 each line only lists one file, that is, single column output-F visual display file 3. command tip: ls-lR lists all files and details in the directory siu @ Darling ~ $ Ls-lR workwork: total usage 12-rw-r -- r -- 1 siu 1477 December 15 13:50 Demo. class-rw-r -- 1 siu 1216 December 15 13:46 Demo. java-rw-r -- 1 siu 506 December 15 13:31 demo.txt ls-lh list all the files in the directory. The size is measured in MB. siu @ Darling ~ /Download $ ls-lh total usage 491M-rw-r -- r -- 1 siu 279 K December 4 17:37 0.8(10.8.15316-release.tar.gz drwxr-x --- 4 siu 4.0 K November 15 09:24 adt-bundle-linux-x86-rw ------- 1 siu 393 M November 21 17:11 adt-bundle-linux-x86.zip-rw-r -- r -- 1 siu 37 K December 4 20:57 blue-on-white.zip-rw-r -- r -- 1 siu 1.7 M December 9 20:59 chinese_11.0.pdf www.2cto.com ls-d * list all files starting with d under the directory siu @ Darling ~ /Work $ ls d * demo.txt ls-F visual display file type/: Directory *: Executable File @: none of the files that match the link: common file siu @ Darling ~ /Work $ ls-Fa. out * Demo. class Demo. java demo.txt life/4. related: in Linux, you can also use the dir command to view the directory, but there is no color identifier. The effect of vdir is the same as that of ls-l. The-C parameter is not listed here, most terminals or releases have the alias ls -- color for ls by default. The command line parameters can be connected and used, such as ls-al and ls-a-l.

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.