2.2 Using the Command Line to Get Help Flashcards
How does the -help parameter differ from the man or info commands?
-help provides brief instructions on a command.
whereas man or info will provide more in-depth explanations and usage examples
What would you use the man command for?
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
Which keys on a keyboard do you use to navigate a man page and what do they do?
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
What would you use the info command for?
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
Which directory stores most of the documentation of the commands that the Linux system is using?
/usr/share/doc
What is the locate command used for?
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
What does the find command do?
The find command searches a directory tree recursively including its subdirectories.
Ex:
find ~-name thesis.pdf
/home/carol/Downloads/thesis.pdf