Some Linux or Unix command to help QA Activities
Posted by: Prince in QA/Testing, Solutions 1 Comment »Some Linux/Unix command to help QA Activities
—————————
Linux/Unix Commands
—————————
See IP Address: ifconfig
See directory :: ls, li, ls
Create directory:: mkdir NAME
go to directory:: cd NAME
go to root :: \
delete directory :: rm -rf NAME
delete force fully directory :: rm -rf NAME
move file :: mv logs/error_log logs/ error_log1
copy file :: cp -rf pdf/abc.pdf test/abc.pdf
copy file all files \cp -rf pdf/* test/
Find process:: ps -ef “processname”
Find Process :: ps -ef | grep java
Kill process:: kill -9 processid, killall procmail
Find and replace:: find . -name conf.xml
Grep Command:: grep “my name is prince” test/PrinceJain
Grep and count no of times: grep “my name is prince” test/PrinceJain | wc -l
set date:: date -s “2 OCT 2006 18:00:00″, date -s “Sun Nov 30 02:09:31 IST 2008″
run process in backend :: nohup php GetName.php &
start stop service::
service iptables stop
/etc/rc.d/init.d/iptables stop
/etc/rc.d/init.d/iptables start
/etc/init.d/mysql restart
/etc/init.d/mysql stop
/etc/init.d/mysql start
To do empty file:: >error_log , cat error_log
To change file/folder permission :: chmod -R 777 upload
To see tail for log file::tail -f FileName
To do file transfer from one machine to another (Unix/Linux)::
scp -r root@192.168.1.13:/home/prince/abc.txt jain/
scp –r prince/abc root@192.168.1.12:/home/prince/
To do file transfer from one machine to another (Linux to windows)::
(First install pscp in window machine)
pscp.exe -r root@192.168.1.13:/home/root/prince.png .
pscp.exe -r C:\ prince.png root@192.168.1.12:/home/prince/
To broadcast message ::
type “wall” , then whatever you want to say (multiple
lines are OK), followed by and then CTRL-D
—————————
CVS Commands
—————————
check out :: cvs co name
update :: cvs update name
diffrence :: cvs diff name
—————————
Vi editor Commands
—————————
open file–vi file name
save and close– :wq
quite without save– :q
save forcefull without save — :q!
find and replace –
:%s/localhost/192.168.1.13/
:%s/localhost/192.168.1.13/g
:%s/localhost/192.168.1.13/gc