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