2.2 Using the Command Line to Get Help Flashcards

1
Q

How does the -help parameter differ from the man or info commands?

A

-help provides brief instructions on a command.

whereas man or info will provide more in-depth explanations and usage examples

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

What would you use the man command for?

A

The man command provides a manual page or “man” page for a specified command to give the user more information as to how they can use it.

ex:

man echo
man ls
man cat
man mkdir

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

Which keys on a keyboard do you use to navigate a man page and what do they do?

A

The up/down arrow keys or the space bar is used to navigate man pages.

Search a man page by typing “/” followed by the string of characters you are looking for.

Use “q” to quit out of a man page back to your CLI.

ex:

/ls –> Will execute a forward facing search of your string

?ls –> Will execute a backward facing search of your string

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

What would you use the info command for?

A

The info command provides more detailed information for a specified command than a “man” page.

Info pages tend to be more human readable and easier to navigate than man pages, but not every command has an Info page.

ex:

info echo
info ls
info cat
info mkdir

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

Which directory stores most of the documentation of the commands that the Linux system is using?

A

/usr/share/doc

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

What is the locate command used for?

A

The locate command searches the entire file system and outputs every name that matches the given string regardless of where in the title the string is found

ex:

locate note
/lib/udev/keymaps/zepto-znote
/usr/bin.zipnote
/usr/share/doc/initramfs-tools/notes.html
/usr/share/man/man1/zipnote/1/gz

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

What does the find command do?

A

The find command searches a directory tree recursively including its subdirectories.

Ex:

find ~-name thesis.pdf
/home/carol/Downloads/thesis.pdf

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