0% found this document useful (0 votes)
265 views4 pages

Practice UNIX Commands PDF

The document provides examples of using various UNIX commands like cd, pwd, ls, grep, ps, df, du, tar, gzip, gunzip and more. It shows how to navigate directories, view file permissions and disk usage, search files for text, manage compressed files and archives, view running processes and more. The commands are demonstrated individually with their outputs occasionally shown.

Uploaded by

Mihai Ionita
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
265 views4 pages

Practice UNIX Commands PDF

The document provides examples of using various UNIX commands like cd, pwd, ls, grep, ps, df, du, tar, gzip, gunzip and more. It shows how to navigate directories, view file permissions and disk usage, search files for text, manage compressed files and archives, view running processes and more. The commands are demonstrated individually with their outputs occasionally shown.

Uploaded by

Mihai Ionita
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Using UNIX commands

cd /etc pwd cd ; pwd ; cd ; pwd cd /home/binf1 echo $PWD cd /usr/local ; pwd cd ../../home/binf1 pwd cd mkdir work mkdir work/tmp cd work/tmp ; pwd cd .. ; pwd touch valami ls ; ls l ; ls la

UNIX commands 2.
echo $SHELL > fajl1; cat fajl1 echo $PWD > fajl2; cat fajl2 echo $SHELL >> fajl2; cat fajl2 echo bla-bla > fajl3 cp /etc/passwd . rm /etc/passwd ; ls l /etc/passwd ls l ; ls l p* ; ls l faj* ; ls l fajl?; ls l ????1 chmod a+rx passwd ls l chmod go-rwx passwd ls l grep root passwd grep ^root passwd grep ROOT passwd grep i ROOT passwd

UNIX commands 3.
grep c root passwd grep root passwd grep root passwd >> passwd grep c root passwd cat /etc/passwd /etc/group passwd > fajl4 grep c root fajl4 ps ; ps a ; ps ef top df k ; du ks alias set set | more set | grep i host set > fajl5

UNIX commands 4.
cd tmp cp /etc/termcap . ls l t* gzip termcap ls l t* gunzip termcap.gz gzip c termcap >termcap.gz cd .. ; pwd du ks tmp/ tar cvf tarfajl.tar tmp ls l tar tvf tarfajl.tar mv tmp tmp1 tar xvf tarfajl.tar gzip tarfajl.tar ls l ; du sk tmp* mv tmp tmp2 gunzip c tarfajl.tar.gz | tar xvf

You might also like