Using Commands in Linux: Hervey Allen
Using Commands in Linux: Hervey Allen
“--help” is right.
Some command examples
Let's start simple:
Display a list of files:
ls
Display a list of files in a long listing format:
ls -l
Display a list of all files in a long listing format
with human-readable file sizes:
ls -alh
Some command examples cont.
Some equivalent ways to do “ls -alh”:
ls -lah
ls -l -a -h
ls –l --all --human-readable
Note that there is no double-dash (‘--’) option
for “-l”. You can figure this out by typing:
man ls
Or by typing:
ls --help
Where's the parameter?
We typed the “ls” command with several
options, but no parameter. Do you think
“ls” uses a parameter?
Core concepts:
• Once you type something unique, press TAB. If
nothing happens, press TAB twice.
• If text was unique text will auto-complete. A
command will complete, directory name, file
name, command parameters will all complete.
• If not unique, press TAB twice. All possibilities
will be displayed.
• Works with file types based on command!
Your mission…
Should you choose to accept it...
• Pay close attention to options and parameters.
• Use “man command” or “command --help” to
figure out how each command works.
• Use command line magic to save lots and lots
and lots and lots of time.
• A command acts upon its parameters based on
the options you give to the command...