Linux command--ls

Source: Internet
Author: User

The LS command is a simplified form of list and is one of the most commonly used commands in a Linux command, and the following are some of the common options for this command!

ls without any parameters, directly list all the files in the current directory! But for the. Start file is not displayed, this is also some webshell as one of the hidden ways of the back door!

[Email protected]:~/linuxcmd# lstest1 test2.txt[email protected]:~/linuxcmd#


ls-a Displays all files, including any hidden files that begin with.

[Email protected]:~/linuxcmd# ls-a.  .. Test1 test2.txt. Test3.txt[email protected]:~/linuxcmd#


ls-a display except. and. All other files, including hidden files!

[Email protected]:~/linuxcmd# ls-atest1 test2.txt. Test3.txt[email protected]:~/linuxcmd#

ls-l displaying various properties of a file using long format

[Email protected]:~/linuxcmd# ls-l Total usage 8drwxr-xr-x 2 root root 4096 Mar 19:09 1 root root 5 Mar 26 1 9:09 Test2.txt

In addition we can cooperate with a to view all out. and. All files except the hidden files that begin with.

[Email protected]:~/linuxcmd# ls-al Total usage 12drwxr-xr-x 2 root root 4096 Mar 19:09 1 root root 5 Mar 26 19:09 test2.txt-rw-r--r--1 root root 5 Mar 19:25. test3.txt


ls-f in order to better distinguish between files and directories, we can use the-f parameter, he will add /in the directory, in the executable file plus *, link file plus @ !

[Email protected]:~/linuxcmd# ls-ptest1/test2.txt[email protected]:~/linuxcmd#


In addition, the various options of the command can be used together!


This article is from the "eth10" blog, make sure to keep this source http://eth10.blog.51cto.com/13143704/1955328

Linux command--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.