Section 14.12 List of Linux Commands
The Linux operating system provides a wealth of commands that are extremely useful. Below you will find some of the most commonly used commands that will be useful in this course, along with descriptions and information on how and when to use them.
ls
:-
lists content of a directory
-
switches modify behavior:
-
-l
: long listing -
-t
: sort by date -
-a
: show all files -
-S
: sort by size -
-r
: sort in reverse order -
-lta
: long, sorted by date, all files -
man ls
:gives information onls
and all possible switches
-
cd
:-
changes working directory
-
cd ~
or simplycd
changes to home directory
pwd
:-
prints working directory
-
alternatively, looks at your command prompt to determine your current location
mkdir
:rm
:-
removes (deletes) a file
-
does not check whether you mean it
-
demonstrate in a shell and file browser with a test file to delete
-
less
:-
displays contents of a file, one screen-full at a time
-
space bar advances one page
-
Ctrl+b
goes back one page -
q
quitsless
and returns you to the command prompt