SEEM3460 Tutorial Tips on Using UNIX
Keyboard shortcuts General Copy: Ctrl+Insert (not Ctrl+c) Cut: Shift+Del (not Ctrl+x) Paste: Shift+Insert (not Ctrl+v) In shell Done: Ctrl+d (usually to finish input) Cancel: Ctrl+c (use this when it hangs)
Directory “~” represents home directory. When used alone, it means your own one; when followed by a username, it means the home directory of that user cd ~/ cd ~oychung/./ means the current directory../ means the parent directory of the current directory / means the root directory usually you need not type “/” except when you are using the root directory
Execution To run a process simultaneously, use “&”. Without doing so, the terminal will be locked until the process finish gedit helloworld.c & To use stdout from exe1 as stdin of exe2, use “|” ls –l /bin | more Use “ ” to redirect stdout. Use “>>” to redirect stdout and write in append mode suppose 1.txt has content “123”, [cat 1.txt] will get “123” only in 1.txt; [cat > 1.txt] will get “123123” in 1.txt