Thursday, 1 January 2015

Unix commands -1

Unix commands

#pwd
#ls
#ls -l
#ls -a
#man ls
#man pwd
#cd /boot/grub

pwd /boot/grub
ls
#clear
cd ..

it takes one step back
 linunx cd  ..
cd ~/
it will take to Home directory
vi Newfile
i
press i
press esc after insert then it will comes in command mode
:wq
save and quit
cat newfile
mv <SRC> <DEST>
rm newfile
ls
rm newfile -i
rm newfile -v

rmdir newfolder -v
------
#cp src dest
cp bands /home/krishna/copied.txt
#clear
vi new\ file
creates new file
cat new\ file
rm new \file
cat textfie
grep this textfile
grep this textfile --count
grep this textfile -- invert-match
clear
grep this textfile -B1 -A1

cat num
sort num -n
sort bands
sort bands -o sortedbands
#passwd
password change
#pidof sap
#kill
----
#su
super user
#root
------
exit

ps
#ps -e
#ps -a
#ps -u sap
#uname
#uname -a
#uname -s
#uname -m

#clear
#who
#whoami
#gzip
#gzip textfile
#ls
#gzip -l textfile.gz
#gzip -d textfile.gz
back to normal file

#tar-xvzf name.tar
#tar -xvzf


#ping <ipaddress>
ctrl+c
#ping -c4 <ipaddress>
4 times it will ping
#clear
#ping -c4 <ip address> -q

#ifconfig


No comments:

Post a Comment