Linux command #linuxcommand
List of Linux command
To list the file :
ls -lrt
ls -lrt .xml* - list the file ending with .xml
To move to directory :
cd directorty name
To move the file :
mv originalfile newfilename
To copy data of one file to another :
cp file1 file2 [data of file1 will be copied to file2]
To remove file :
rm filename
To remove file recursivley (forcefully) :
rm -rf filename
To create directory :
mkdir directoryname
To give permission to directory :
chmod -R 775 directoryname
To compare two jar :
If server OS is Linux : md5sum jarname
If server OS is AIX : cusm -h MD5 jarname
To check if port is in listen mode on server :
netstat -an|grep portname [eg. portname - 8182]
netstat -anc|grep portname
To check how many services are running on server :
ps -ef|grep java
Oracle weblogic server command -
To start the weblogic :
nohup ./startWeblogic.sh &
nohup ./startNodemanager &
To stop the weblogic :
nohup ./stopNodemanager.sh
nohup ./stopWeblogic.sh
To check if services started or not : tail -f nohup.out
To search log or any file in server
If file format is .gz use zgrep else use grep
zgrep "" fileformat*
grep "" fileformat*
grep "" *
To open file :
you can use cat , vi , less , zmore , more
cat filename
To search inside file press /enterword that you want to search and press N to go next line , press U to move to previous line
/ - used to search from starting of the file
? - used to search from last of the file [press G to go the end of the file]
To refresh the log : press :e! then do enter
To create file : vi filename
To save the file : :wq!
To close the file : :q!
To get the status of any URL connectivity in server :
wget urlname
To check space availability in server :
If OS is AIX : df -g or df
If OS is Linux : df -h or df
To check which directory is taking how much space :
du -a/*
To start and stop the services on server :
start : sh ./bin/run.sh
stop : sh ./bin/shut.sh
To tar and untar file :
tar : tar -xvf filename.tar
untar : tar -cvf filename.tar filename2/[filename2 - where we want to untar]
To copy file from one directory to another :
cp 'filename' ../ [filename will get copied to one directory back]
Comments
Post a Comment