1-1 Access a shell prompt and Issue Commands With Correct Syntax Flashcards

1
Q

man command

ex:

man ls

man cp

A

Access a command’s basic usage documentation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

man command

Brackets []

A

Access a command’s basic usage documentation

Option’s usage is optional and NOT required

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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]

A

Inside man command,

Without outter brackets of option usage, the option that is no longer in brackets

Ex:

cal 05 2019

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In man command

Options in option usage description (Synopsis)

NO[] brackets

ex:

mv [OPTION]… SOURCE… DIRECTORY

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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]]

A

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(?)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In man command

In options usage description (Synopsis)

Pipe | character meaning

Ex:

SYNOPSIS
date [OPTION]… [+FORMAT]
date [-u|–utc|–universal] [MMDDhhmm[[CC]YY][.ss]]

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly