40 likes | 210 Views
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.
E N D
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 • gedithelloworld.c & • To use stdout from exe1 as stdin of exe2, use “|” • ls –l /bin | more • Use “<“ to redirect stdin and use “>” to redirect stdout. Use “>>” to redirect stdout and write in append mode • suppose 1.txt has content “123”,[cat < 1.txt > 1.txt] will get “123” only in 1.txt; [cat < 1.txt >> 1.txt] will get “123123” in 1.txt