Go to the first, previous, next, last section, table of contents.


Sorting the output

These options change the order in which ls sorts the information it outputs. By default, sorting is done by character code (e.g., ASCII order).

`-c'
`--time=ctime'
`--time=status'
Sort according to the status change time (the `ctime' in the inode). If the long listing format (`-l') is being used, print the status change time instead of the modification time.
`-f'
Primarily, like `-U'---do not sort; list the files in whatever order they are stored in the directory. But also enable `-a' (list all files) and disable `-l', `--color', and `-s' (if they were specified before the `-f').
`-r'
`--reverse'
Reverse whatever the sorting method is--e.g., list files in reverse alphabetical order, youngest first, smallest first, or whatever.
`-S'
`--sort=size'
Sort by file size, largest first.
`-t'
`--sort=time'
Sort by modification time (the `mtime' in the inode), newest first.
`-u'
`--time=atime'
`--time=access'
`--time=use'
Sort by access time (the `atime' in the inode). If the long listing format is being used, print the last access time.
`-U'
`--sort=none'
Do not sort; list the files in whatever order they are stored in the directory. (Do not do any of the other unrelated things that `-f' does.) This is especially useful when listing very large directories, since not doing any sorting can be noticeably faster.
`-X'
`--sort=extension'
Sort directory contents alphabetically by file extension (characters after the last `.'); files with no extension are sorted first.


Go to the first, previous, next, last section, table of contents.