You are on page 1of 2

Commands: =========== man ls ls --help ls [filename] ls -l dir date who who am i pwd cat > filename cat >>

filename cat filename cat < filename more filename mv file1/dir1 file2/dir2 ln oldfile newfile rm filename rm -rf dirname chmod [u|g|o|a] [+|-] [r|w|x] filename mail mail username logout exit wc filename sort -r -n -nr filename tail -n 5 p.txt : last 5 lines tail -n -5 p.txt : last 5 lines tail -n +5 p.txt : from line 5 to rest. head -n 5 p.txt : first 5 line head -n +5 p.txt : first 5 line head -n -5 p.txt : cut 5 lines from last cmp file1 file2 diff file1 file2 pr filename bc cal cd path mkdir dirname cp [path/]filename path clear ---su ps kill process-id ---------------------------------END-----------------------------------------Redirection: ============= > (add to file) < (from file) >> (append to file) Running command in background: =============================== command &

Pipelining command: =================== ls -l | grep hello | sort -r Multiple input for a command: ============================== sqlplus<<eof line used as input for sqlplus... line used as input for sqlplus... line used as input for sqlplus... eof Searching Pattern: =================== * :match any string ? :match any single character [abc] :match any one of enclosed character [a-d] :match any one of enclosed range e.g. a,b,c,d [!abc] :not match any one of enclosed character [!a-d] :not match any one of enclosed range e.g. a,b,c,d Running multiple command together: ================================== command1;command2;.... Error to file: ============== rm wrong-file-name >file-name :if error occur o/p don't goes to file rm wrong-file-name 2>file-name :if error occur o/p don't goes to file now

You might also like