1-1 Access a shell prompt and Issue Commands With Correct Syntax Flashcards
man command
ex:
man ls
man cp
Access a command’s basic usage documentation
man command
Brackets []
Access a command’s basic usage documentation
Option’s usage is optional and NOT required
Inside man command,
Options are nested in brackets,
Which option will be needed first before other nested options are given?
ex:
Which one out of day, month, year?
cal [options] [[[day] month] year]
Inside man command,
Without outter brackets of option usage, the option that is no longer in brackets
Ex:
cal 05 2019
In man command
Options in option usage description (Synopsis)
NO[] brackets
ex:
mv [OPTION]… SOURCE… DIRECTORY
Access a command’s basic usage documentation
Option’s usage is required and NOT optional
ex:
mv [OPTION]… [-T] SOURCE DEST
One source and one destination file is required
mv [OPTION]… SOURCE… DIRECTORY
At least one source is required, one and only one directory
mv [OPTION]… -t DIRECTORY SOURCE…
-t flag after lookup means destination directory, one destination required and at least one source file required
In man command
In options usage description (Synopsis)
Special characters meanings . + and -
Ex:
SYNOPSIS
date [OPTION]… [+FORMAT]
date [-u|–utc|–universal] [MMDDhhmm[[CC]YY][.ss]]
Access a command’s basic usage documentation
Special characters needed before a option is given
Ex:
SYNOPSIS
date [OPTION]… [+FORMAT]
+ is required when giving a format option from its format docuemntation section (in man command)
date [-u|–utc|–universal] [MMDDhhmm[[CC]YY][.ss]]
. - and – required for -u –utc –universal, and . is needed for seconds(?)
In man command
In options usage description (Synopsis)
Pipe | character meaning
Ex:
SYNOPSIS
date [OPTION]… [+FORMAT]
date [-u|–utc|–universal] [MMDDhhmm[[CC]YY][.ss]]
Access a command’s basic usage documentation
Pipe character means use ONLY one (as in OR) of given options
Ex:
SYNOPSIS
date [-u|–utc|–universal] [MMDDhhmm[[CC]YY][.ss]]
-u OR –utc OR –universal, pick ONLY ONE