Tuesday, March 27, 2007

Unix / Linux Command Tips

When you're stuck, just remember "I'm a helpless man" Most commands allow the option "--help", which can then be redirected to "less" (or "more")
e.g.
cat --help | less

To see the man page (more detailed help) for a command type "man" followed by the command
e.g.
man cat

What if you don't remember the name of the command, but you know it was something like lvm? Try apropos

apropos lvm

What if the man page is the right name, but it displays something about c programming? Use the -a option, and press q until you get the the correct man page.

man -a cat

For more information look for a HOWTO or other documentation at the Linux Documentation Project -- http://www.tldp.org

No comments: