Commands
Commands
Windows /cent OS
compatability Mozilla/Chrome
Linux Commands:
****************
ls
ls /root/Desktop/playdateandtime
ls ../REALSHOPPEE_ALL_BACKUPS/
ll
ll -t /root/Desktop/playdateandtime
ll -r../REALSHOPPEE_ALL_BACKUPS/
This command is used to get detail information about files and directories in
present working directory.
2. ll a*
Displays detail info of all files/directories with names starting with letter a.
3. ll *.txt
Displays detail info of all files/directories with extension txt. i.e. all text
files are displayed.
4. ll -ltr
Displays detail info of files and directories in reverse order of last modification
cd
cd playdateandtime
cd /root/Desktop/playdateandtime
cd ../REALSHOPPEE_ALL_BACKUPS/
pwd
mv
mv test.pl abcd.pl
ll -t
ll before_implement
mv abcd.pl before_implement/
ll before_implement
mv before_implement/ /var/www/html/
ll /var/www/html/
ll /var/www/html/before_implement/
ll before_implement
mv /var/www/html/before_implement/ .
mkdir
mkdir /var/www/html/test
ll /var/www/html/test/var/w
ll /var/www/html/test
mkdir -p test1/test2/test3
ll test1/test2/test3
ll test1/test2/
ll test1/
ll test1/test2/test4
mkdir -p test1/test2/test4
ll
mkdir -p test1 test2 test4
touch
vim test4/abcd.txt
touch test4/123.txt
vi comes from vim and its a Editor. touch is used for time stamping and also it is
used for create empty files. using touch -a and touch -m you can access and modify
a files
rm
rm -r test4/
rm -rf test4/
mkdir test4
touch test4/123.txt
rm test4/123.txt
rm -f test4/123.txt
cp
cp /root/Desktop/before_implement/abcd.pl .
ll
cp /root/Desktop/before_implement/abcd.pl .
cp /root/Desktop/before_implement/abcd.pl xyz.pl
ll
cp /root/Desktop/before_implement/abcd.pl abcd.pl
pwd
cp ../../before_implement/ test4/
cp -r ../../before_implement/ test4/
ll test4/
cp -r ../../before_implement/ test4/
cp 123.pl abcd.txt xyz.log /var/www/hml/
cp /var/www/hml/123.pl /var/www/hml/abcd.txt /var/www/hml/xyz.log
/root/Desktop/
scp
scp -r ../../before_implement/ test4/
scp -r ../../before_implement/ test4/test5/
ping
ping 192.168.0.193
ping 192.168.1.44
ping google.com
ping googlqqqqqqqqqqqqqqe.com
ping 192.168.1.44.88
chmod
ll
chmod -R 777 abcd.pl xyz.pl
ll
chmod -R 774 abcd.pl xyz.pl
ll
chmod -R 775 abcd.pl xyz.pl
chmod -R 444 abcd.pl xyz.pl
chmod -R 666 abcd.pl xyz.pl
ll
chmod -R 555 abcd.pl xyz.pl
ll
chmod 777 abcd.pl xyz.pl
chmod 111 abcd.pl xyz.pl
ssh
ssh 192.168.1.44
ssh [email protected]
ssh 192.168.1.44 -p22
ssh 192.168.1.44 -p224
ssh 192.168.1.44 -p22
ssh [email protected] -p22
ifconfig
ifconfig
ifconfig eth0
history
history
history | grep "crontab"
history | grep "ssh"
grep
grep -ril "mysql_close()" /var/www/html/ConVox3.0/
grep -ril --exclude="*.svn*" "mysql_close()" /var/www/html/ConVox3.0/
grep -ril --exclude="*.svn*" "convoxccs_breaks.*description"
/var/www/html/ConVox3.0/
vim /var/www/html/ConVox3.0/Admin/Module/breaks.php
grep -ril --exclude="*.svn*" "insert.*convoxccs_breaks.*description"
/var/www/html/ConVox3.0/
vim /var/www/html/ConVox3.0/Admin/Module/breaks.php
grep -ril --exclude="*.svn*" "INSERT.*convoxccs_breaks.*description"
/var/www/html/ConVox3.0/
vim /var/www/html/ConVox3.0/Admin/Module/breaks.php
grep -rl --exclude="*.svn*" "INSERT.*convoxccs_breaks.*description"
/var/www/html/ConVox3.0/
grep -rl --exclude="*.svn*" "insert.*convoxccs_breaks.*description"
/var/www/html/ConVox3.0/
grep -r --exclude="*.svn*" "insert.*convoxccs_breaks.*description"
/var/www/html/ConVox3.0/
grep -r --exclude="*.svn*" "convoxccs_breaks" /var/www/html/ConVox3.0/
grep -rl --exclude="*.svn*" "convoxccs_breaks" /var/www/html/ConVox3.0/
grep -rl --exclude="*.svn*" --exclude="*~" "convoxccs_breaks"
/var/www/html/ConVox3.0/
grep -rl --exclude="*.svn*" --exclude="*~" --exclude="*2017*"
"convoxccs_breaks" /var/www/html/ConVox3.0/
find
find /var/www/html/ConVox3.0/ -name "breaks.php"
find /var/www/html/ConVox3.0/ -name "breaks*"
find /var/www/html/ConVox3.0/ -name "breaks*"
find /var/www/html/ConVox3.0/ -name "breaks*" | grep "svn"
find /var/www/html/ConVox3.0/ -name "breaks*" | grep -v "svn"
locate
locate "abcd.pl"
locate "*abcd*"
diff
diff /root/Desktop/before_implement/1234.pl
/root/Desktop/before_implement/4444.pl
kompare
kompare /root/Desktop/before_implement/1234.pl
/root/Desktop/before_implement/4444.pl
date
date
date -s "Thu Apr 13 16:46:24 IST 2017"
date
date -s "Thu Apr 13 15:46:40 IST 2017"
date
ntpdate time.windows.com
init
init 6
init 0
uptime
last reboot
last reboot
last reboot | less
pgrep
grep mysqld
pgrep mysqld
pgrep httpd
pgrep crond
pkill
pgrep crond
pkill crond
pgrep crond
pkill -9 crond
kill
mysql
pgrep mysqld
kill 3374
kill -9 3492
pgrep mysqld
mysql
service
service crond status
service crond stop
service crond status
service crond start
service crond status
service crond stop
service crond status
service crond restart
service mysqld status
service mysqld restart
service mysqld status
mysql
service mysqld stop
mysql
service mysqld status
service mysqld start
asterisk
asterisk
asterisk -r
pgrep asterisk
pkill -9 asterisk
pgrep asterisk
asterisk
pgrep asterisk
kill 15470
pgrep asterisk
safe_asterisk
pgrep asterisk
asterisk -rnx "sip show users"
asterisk -rnx "sip show peers"
asterisk -rnx "show manager connected"
screen
screen -r
screen -wipe
ps aux
ps aux | grep "SCREEN"
screen -wipe
ps aux | grep "convox-sms"
vim /usr/share/convox/convox_sms.pl
perl -c /usr/share/convox/convox_sms.pl
screen -wipe
kill 15121
screen -wipe
service crond status
date
screen -wipe
vim /usr/share/convox/convox_sms.pl
date
screen -wipe
date
screen -wipe
pkill convox
screen -wipe
ps aux | grep convox-waiting-delete
pkill waitingcalls
screen -wipe
crontab
crontab -e
crontab -l
crontab -l
crontab -l > crontab.txt
crontab -l
crontab -r
crontab -l
crontab < crontab.txt
crontab -l
crontab -l
crontab -l | grep "*php*"
crontab -l | grep "*asterisk*"
crontab -l | grep "asterisk"
crontab -l | grep "php"
crontab -l | grep "asterisk" | grep "stop"
cat
cat /root/Desktop/before_implement/1234.pl (display code)
cat crontab.txt (content)
cat crontab.txt > 111.log
diff crontab.txt 111.log
cat crontab.txt | grep "pl"
cat crontab.txt | grep "aster"
cat crontab.txt /root/Desktop/before_implement/1234.pl
cat crontab.txt /root/Desktop/before_implement/1234.pl > total.txt
vim total.txt
cat /root/Desktop/before_implement/abcd.pl
/root/Desktop/before_implement/1234.pl > 4.txt
vim 4.txt
cat /root/Desktop/before_implement/4444.pl
/root/Desktop/before_implement/1234.pl > 4.txt
vim 4.txt
vim /root/Desktop/before_implement/4444.pl
vim 4.txt
wc -l 4.txt (word count)
du -h 4.txt (size)
cat /root/Desktop/before_implement/4444.pl
/root/Desktop/before_implement/1234.pl > 4.txt
wc -l 4.txt
du -h 4.txt
vim 4.txt
cat /root/Desktop/before_implement/4444.pl
/root/Desktop/before_implement/1234.pl >> 4.txt
wc -l 4.txt
du -h 4.txt
source
source /root/Desktop/before_implement/1234.pl
vim command.txt
source command.txt
vim command.txt
ll ab*
source command.txt
ll ab*
ll command.txt
./command.txt
chmod -R 111 command.txt
ll command.txt
./command.txt
source command.txt
setup
setup
vim /etc/rc.local
mysql
mysqldump convoxccs3
mysqldump convoxccs3 > convoxccs3.sql
mysqldump convoxccs3 convoxccs_agent_details
mysqldump convoxccs3 convoxccs_agent_details > convoxccs_agent_details.sql
mysql convoxccs3 < convoxccs3.sql
mysql
cd Desktop/
mysql convoxccs3
cd
vim convoxccs_agent_details.sql
mysql convoxccs3 < convoxccs_agent_details.sql
vim convoxccs_agent_details.sql
mysql convoxccs3 < convoxccs_agent_details.sql
mysqldump convoxccs3 convoxccs_agent_details > convoxccs_agent_details.sq
vim convoxccs_agent_details.sql
mysqldump convoxccs3 convoxccs_queues > convoxccs_queues.sql
vim convoxccs3.sql
mysql convoxccs3 < convoxccs3.sql
mysql convoxccs3
mysql convoxccs3 < convoxccs3.sql
mysql convoxccs3
mysqldump --no-data convoxccs3 > convoxccs3.sql
vim convoxccs3.sql
mysqldump convoxccs3 --where="1 limit 1" > convoxccs3.sql
vim convoxccs3.sql
mysqldump convoxccs3 --where="1 limit 1" -uconvox -pconvox > convoxccs3.sql
mysqldump convoxccs3 --where="1 limit 1" -uconvox -p > convoxccs3.sql
mysql convoxccs3
mysql -e "select * from convoxccs_queues"
mysql -e "select * from convoxccs_queues" convoxccs3
mysql -e "select * from convoxccs_queues" convoxccs3 > data.txt
vim data.txt
mysql convoxccs3
mysql -e "select
queue_name,queue_did,call_queue_file_id,queue_type,custom_application_id from
convoxccs_queues" convoxccs3 > data.txt
vim data.txt
mysql convoxccs3
mysql -e "select description, process, break,break_time from
convoxccs_breaks;" convoxccs3 > data.txt
vim data.txt
mysql convoxccs3
mysql -e "select description, process, break,break_time from
convoxccs_breaks;" convoxccs3 -uconvox -pconvox
mysql -h192.168.1.193 -e "select description, process, break,break_time from
convoxccs_breaks;" convoxccs3 -uconvox -pconvox
mysql -h192.168.1.193 -e "select description, process, break,break_time from
convoxccs_breaks;" convoxccs3 -uroot -p
mysql -h192.168.0.193 -e "select description, process, break,break_time from
convoxccs_breaks;" convoxccs3 -uconvox -pconvox
source convoxccs3.sql
source /root/convoxccs3.sql
top
q - close top output
c - get detailed files
uname
uname -m
cat /etc/redhat-release
uname -a
vim /etc/redhat-release
tail
tail /root/Desktop/before_implement/menu_items.php
tail /root/Desktop/before_implement/1234.pl
tail -n2 /root/Desktop/before_implement/1234.pl
tail -f /root/Desktop/before_implement/1234.pl
head
head -n2 /root/Desktop/before_implement/1234.pl
vim
i/insert button
:w
:wq
:w!
:wq!
:q
:q!
y
10yy
p
dd
p
v (select required content -> y/d -> p)
SHIFT+5 - To match braces (), [], {} and <>
u -undo
CTRL+r - redo
search - /content
n for next occurence
SHIFT+n for next occr in revere direction
/d.*d.*s
:%g/perl/d -delete lines which contains perl
:g!/php/d - delete lines which doesn't contain php
%s/perl/php/igc
% - Entire file
s - Search
/Search word
/Replace word
i - Case in sensitivce
g - replace instruction
c - conformation
%s/php.*/php/gc - will replace any content after php
%s/.*php/php/gc - will replace any content before php
gUU - convert entire line to upper case
guu - convert entire line to lower case
SHIFT+~ to convert character to upper or lower case
gedit
gedit /root/Desktop/before_implement/1234.pl
nautilus
nautilus /var/www/html
zip
zip abcd.zip /root/Desktop/before_implement/
zip abcd.zip /root/Desktop/before_implement/1234.pl
/root/Desktop/before_implement/4444.pl
ll -t
mkdir test
mv abcd.zip test/
ll
cd test/
ll
unzip abcd.zip
l
ll
zip -r 44.zip /root/Desktop/before_implement/
cp -r root/Desktop/before_implement/ .
ll
zip -r 44.zip before_implement/
ll -t
zip -r before_implement.zip before_implement/
ll -t
rm -rf before_implement/
unzip -t before_implement.zip
ll
unzip before_implement.zip
ll -t
zip -r before_implement.zip /root/test/before_implement/
cd ..
zip -r test.zip test/
svn
svn co http://192.168.1.23:8023/svn/ConVoxCCS3.2/tags/UEDCL_Uganda/
rm -rf UEDCL_Uganda/
svn co -r180 http://192.168.1.23:8023/svn/ConVoxCCS3.2/tags/UEDCL_Uganda/
mv UEDCL_Uganda/ 180
svn co http://192.168.1.23:8023/svn/ConVoxCCS3.2/tags/UEDCL_Uganda/
mv UEDCL_Uganda/ 183
ll -t
diff -r 183/ 180/
diff -r 183/ 180/ > diff.log
vim diff.log
svn log http://192.168.1.23:8023/svn/ConVoxCCS3.2/tags/UEDCL_Uganda/
svn log http://192.168.1.23:8023/svn/ConVoxCCS3.2/tags/UEDCL_Uganda/ | less
rm -rf 180/
svn co -r153 http://192.168.1.23:8023/svn/ConVoxCCS3.2/tags/UEDCL_Uganda/
diff -r 183/ 153/ > diff.log
mv UEDCL_Uganda/ 153
diff -r 183/ 153/ > diff.log
vim diff.log
kompare 183/var/www/html/ConVoxCCS/Agent/manual_sms.php
153/var/www/html/ConVoxCCS/Agent/manual_sms.php
svn checkout http://192.168.1.23:8023/svn/ConVoxCCS3.2/tags/Tejuri/
rm -rf /root/.subversion/auth/
rm -rf Tejuri/
svn checkout http://192.168.1.23:8023/svn/ConVoxCCS3.2/tags/Tejuri/
cd Tejuri/
vim var/www/html/index.php
svn st
rm usr/share/convox/convox_config.sh
svn st
cp /root/test/before_implement/1234.pl usr/share/convox/
svn st
cd ..
rm -rf Tejuri/
svn copy
http://192.168.1.23:8023/svn/ConVoxCCS3.2/tags/ConVoxCCS3.2_Source_Package_24-05-
2016/ http://192.168.1.23:8023/svn/ConVoxCCS3.2/tags/Training/ -m "Creating tag
Training from ConVoxCCS3.2_Source_Package_24-05-2016 with revison 183."
svn copy -r40
http://192.168.1.23:8023/svn/ConVoxCCS3.2/tags/ConVoxCCS3.2_Source_Package_24-05-
2016/ http://192.168.1.23:8023/svn/ConVoxCCS3.2/tags/Training40/ -m "Creating tag
Training from ConVoxCCS3.2_Source_Package_24-05-2016 with revison 40."
svn log http://192.168.1.23:8023/svn/ConVoxCCS3.2/tags/Training/ | less
svn log http://192.168.1.23:8023/svn/ConVoxCCS3.2/tags/Training40/ | less
svn info /var/www/html/ConVox3.0
svn co http://192.168.1.23:8023/svn/ConVoxCCS3.2/tags/Training/
cd Training/
rm usr/share/convox/convox_config.sh
vim var/www/html/index.php
svn st
cp /root/test/before_implement/1234.pl usr/share/convox/
svn st
svn delete usr/share/convox/convox_config.sh
svn st
rm usr/share/convox/1234.pl
svn st
cp /root/test/before_implement/1234.pl usr/share/convox/
svn st
svn add usr/share/convox/1234.pl
svn st
encrypt
/usr/src/ioncube_encoder5_basic_7.0/ioncube_encoder5 menu_items.php -o
menu_items_enc.php
/usr/src/ioncube_encoder5_basic_7.0/ioncube_encoder5 changes/ -o changes_enc/