LS Displays the contents of the directory, the file is in alphabetical order of A to Z, the priority is as follows;
A-Z
A-Z
That is, if you do not add any sort of parameters, the first letter of the file name is a number, will be given precedence, followed by A-Z, then A-Z, the following are the parameters of the ordering, we will know the size of the file, we need to use the-s parameter;
If it is sorted in reverse order, we need to use the-R parameter;
Sort by the last visit, using the-t parameter;
Sorts according to the extension, using the parameter-X;
Example [root@localhost ~]# ls
123.txt fonts.scale kernel Myinstall.log upgrade.log
anaconda-ks.cfg install.log.syslog mkuml-2004.07.17-ananas.tar.bz2 plinux.txt Upgrade.log.syslog [root@localhost ~]# ls-ls/root
[root@localhost ~]# ls-ls
Total 180
-rw-r--r--1 root root 68012 04-04 20:28 mkuml-2004.07.17-a nanas.tar.bz2
-rw-r--r--1 root 53992 03-16 08:54 myinstall.log
Example: [Root@localhost ~]# LS-LR
Total 180
-rw-r--r--1 root 0 03-26 18:39 upgrade.log.syslog
-rw-r--r--1 root root 613 03-26 18:41 upgrade.log
-rw-r--r--1 root 0 04-19 14:10 plinux.txt
[Root@localhost ~]# Ls-lt
Total 180
Drwxr-xr-x 2 root root 4096 04-19 20:04 kernel
-rw-r--r--1 root 04-19 15:06 123.txt
-RW-------1 root root 1375 04-19 15:04 anaconda-ks.cfg
-rw-r--r--1 root 0 04-19 14:10 plinux.txt