❺ File size in bytes.
❻ Date and time of the last change.
❼ Name of the object.
Usually, you can combine several options by prexing only the rst option with a
hyphen and then write the others consecutively without a blank. For example, if you
want to see all les in a directory in long listing format, you can combine the two
options -l and -a (show all les) for the ls command. Executing ls -la shows also
hidden les in the directory, indicated by a dot in front (for example, .hiddenfile).
The list of contents you get with ls is sorted alphabetically by lenames. But like in
a graphical le manager, you can also sort the output of ls -l according to various
criteria such as date, le extension or le size:
•
For date and time, use ls -lt (displays newest rst).
•
For extensions, use ls -lx (displays les with no extension rst).
•
For le size, use ls -lS (displays largest rst).
To revert the order of sorting, add -r as an option to your ls command. For example,
ls -lr gives you the contents list sorted in reverse alphabetical order, ls -ltr shows
the oldest les rst. There are lots of other useful options for ls. In the following
section you will learn how to investigate them.
7.2.3 Getting Help
Nobody is expected to know all options of all commands by heart. If you remember
the command name but are not sure about the options or the syntax of the command,
choose one of the following possibilities:
--help option
If you only want to look up the options of a certain command, try entering the
command followed by a space and --help. This --help option exists for many
commands. For example, ls --help displays all the options for the ls command.
Manual Pages
To learn more about the various commands, you can also use the manual pages.
Manual pages also give a short description of what the command does. They can
be accessed with man followed by the name of the command, for example, man ls.
The man pages are displayed directly in the shell. To navigate them, move up
and down with [Page ↑] and [Page ↓]. Move between the beginning and the end
of a document with [Home] and [End]. End this viewing mode by pressing [Q].
Learn more about the man command itself with man man.
Info Pages
Info pages usually provide even more information about commands. To view the
info page for a certain command, enter info followed by the name of the command
88 Start-Up