General UNIX Tips and Lost-and-Found Insight - dummies

General UNIX Tips and Lost-and-Found Insight

By John R. Levine, Margaret Levine Young

Part of UNIX For Dummies Cheat Sheet

Working with UNIX isn’t that complicated, but it does mean getting familiar with a whole new set of commands and ways of doing things. Here are some general tips when working in UNIX:

  • Log in before you use UNIX. Remember your user name and password.

  • When you see a prompt (usually $ or %), you can type a UNIX command.

  • To back up and correct typos, try pressing Backspace, Delete, # (Shift+3), or Ctrl-H.

  • To cancel what you have typed and try again, try pressing Ctrl+U or @ (Shift+2).

  • Type a space between the command name and any other information on the same line.

  • When typing commands, use the correct capitalization; UNIX distinguishes between CAPITAL and small letters.

  • When you have typed the command, press Enter (or Return).

  • When you log in, the working directory is your home directory.

  • To log out, type exit.

  • Don’t turn off terminal until you have logged out. Don’t turn off workstations or PCs except by running shutdown or halt.

If you forget where you are, how you logged in, and for other lost-and-found tips, use these:

  • To find out where you are, type pwd.

  • To find out who you logged in as, type who am I.

  • To find a file if you remember its name, type: find . -name filename -print

  • To find a file if you know that it contains the word dummies, type: grep dummies *