GNU/Linux provides several other utilities that are useful for "paging" through text files (i.e., for viewing files one page at a time). Several of these commands are outlined in the following table. Command Description move through a file screen by screen (hit space for the next page, return for one more more line) a new and improved version that allows backward paging as well with the less down-arrow, Page Up, and Page Dn. head show the first few lines of a file tail show the last few lines of a file The Manual Linux includes an on-line help system, called the There is a "man page" describing each manual. Linux command and each C library function. Don't worry if you don't understand everything you see in a man page. They are often long and cryptic, but you can learn a lot without having to understand everything. For example, try typing "man cat" to read about cat. You should see the command name and a quick synopsis of how to use the command. For example, the synopsis"cat [OPTION] [FILE] ..." tells you that cat (optionally) takes a file as it's input, and it also can take (optional) options as parameters. A list of the options follows the synopsis. Another handy use for the man pages is finding commands or C functions when you don't remember, or never knew, their names. Suppose you wanted to find a function for computing the square root: you could guess that such a function might exist, but you might not know its name. To print a list of man pages that include the word "square" in the name or description fields, you could use "man -k square". Of course, keyword searches are more useful for some commands than others: "man -k print" may reap you more results than you want to deal with! Directory and File Permissions From a user's perspective within Unix or Linux, the world of files and directories is divided into three categories: the user the user's group (e.g., CS faculty or student) everyone else For each of these categories, users in these categories can have three types of capabilities: an individual might have permission to read a file
GNU/Linux provides several other utilities that are useful for "paging" through text files (i.e., for viewing files one page at a time). Several of these commands are outlined in the following table. Command Description more move through a file screen by screen (hit space for the next page, return for one more line) less a new and improved version that allows backward paging as well with the down-arrow, Page Up, and Page Dn. head show the first few lines of a file tail show the last few lines of a file The Manual Linux includes an on-line help system, called the manual. There is a "man page" describing each Linux command and each C library function. Don't worry if you don't understand everything you see in a man page. They are often long and cryptic, but you can learn a lot without having to understand everything. For example, try typing "man cat" to read about cat. You should see the command name and a quick synopsis of how to use the command. For example, the synopsis"cat [OPTION] [FILE] ..." tells you that cat (optionally) takes a file as it's input, and it also can take (optional) options as parameters. A list of the options follows the synopsis. Another handy use for the man pages is finding commands or C functions when you don't remember, or never knew, their names. Suppose you wanted to find a function for computing the square root: you could guess that such a function might exist, but you might not know its name. To print a list of man pages that include the word "square" in the name or description fields, you could use "man -k square". Of course, keyword searches are more useful for some commands than others: "man -k print" may reap you more results than you want to deal with! Directory and File Permissions From a user's perspective within Unix or Linux, the world of files and directories is divided into three categories: the user the user's group (e.g., CS faculty or student) everyone else For each of these categories, users in these categories can have three types of capabilities: an individual might have permission to read a file
week2_basic-linux-commands-and-capabilities.docx