Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

  1. cd <dir> - change directory, takes a path
  2. mv <src> <dest> - moves a file from src to dest, -R will move a folder
  3. cp <src> <dest> - like move, but copies
  4. ps - see current processes running, suspended, or terminated (but not yet harvested)
  5. rm <fileOrDirName> - remove file, -R for directories. BE CAREFUL, there is no recovering what you delete. If you use the -f flag, rm will not ask confirmation about deleting each file. rm -Rf / will wipe the computer (hopefully you don't have permissions to do that)
  6. mkdir <dirname> - creates a directory of the name given
  7. Wiki Markup*chmod* &nbsp;\chmod  [args\] <filename>\- changes permissions
  8. touch <filename> - changes modification and access times if the file already exists, creates a new file otherwise
  9. ls - list contents of current directory
  10. pwd - display path to working directory (current directory)
  11. echo <string> - prints the string to the screen.
  12. cat <filename> - prints the contents of file to the screen
  13. grep <string> <filename> - prints the lines in file that contain the string
  14. printenv - prints out all the environment variables and their values
  15. man <cmdname> will display info regarding the specified command

...

  • ctrl-C will interrupt the current running program, and get you back to the shell
  • ctrl-D sends EOF

-IO Redirection

  • <cmd> < <filename> operator redirects stdin from the command line to file
  • <cmd> > <filename> operator redirects stdout from the command line to file
  • <cmd1> | <cmd2> 'pipe' operator redirects output of cmd1 as input to cmd2
  • the operators can be combined