CSC231 Bash Tutorial 3
--D. Thiebaut (talk) 10:23, 16 February 2017 (EST)
In this lab you will learn about the manual pages, and pipes.
Manual Pages
- Linux contains its own documentation. It's called the Linux Manual Pages, and you access them using the man command.
- Let's get the manual pages for some of the commands you know:
man ls
- the line ls [OPTION]... [FILE]... indicates that the command takes optional arguments, or switches, and optionally the name of a file. The line below indicates that -a ls will not ignore entries starting with a dot.
- Let's see how to apply this information (do not type the text in parentheses):
cd ls ls *.asm ls -a |
(go back to your home directory) |
- Other man pages you should look at:
man rm man cp man mkdir man rmdir
- If for some reason you want to use a command but you don't know its name, try searching the man pages for a keyword. For example, you forgot the command name hexdump, but remember that it displays information in hexadecimal...
man -k hexadecimal
- If you go up the list, you should find hexdump.
The man pages were created at a time when search engines did not exist, and they were the quick way for Linux users to have access to the documentation of Linux commands. Nowadays you can probably get less cryptic and more informative examples by using Google to search for various commands, either by name, or by keywords. None the less, what you will get on Google will only be a variation on the original contents of the man pages.