Important Linux Commands
ls -lrt → command lists the contents of the directory with all the details, in reverse order of their modification time (older files will be displayed first)
ls -lrth → This will list the contents of the current directory showing more information and sorting them so the most recently modified file will be displayed last. The h flag makes the file sizes more human friendly!
chmod 755 <name> → chmod 755 sets the 755 permission for a file. 755 means full permissions for the owner and read and execute permission for others.
ln -s 14.9.0-SNAPSHOT current → Create a current tag and mapped to current version. To link files in the same directory
Update Any File → sed -i 's/10.46.87.148/10.46.87.115/g' journal.sch textToFind → 10.46.87.148 replaceText → 10.46.87.115 FileName → journal.sch . SED is a text stream editor used on Unix systems to edit files quickly and efficiently
Untar a tar file → tar -xvzf filename.tar
Rmove a folder → rm -r folderName
netstat -anpe | grep "1234" | grep "LISTEN"
→ Application listening to the specific port.grep -Ril "text-to-find-here" /
→ Find a test in all the files in linux.Generate a keystore → keytool -genkey -alias Anykeystore -keyalg RSA -keystore keystore
Add certificate to key store → keytool -importcert -file any.cer -keystore keystore -alias "Anycertificate"
Copy a file from one AMS to another AMS → scp filename user@10.46.87.146:/path
To check port on which application is running → ps -ef | grep appcrm
grep -irl "BalanceMgr&interval" * → To get the files that have this text.
Change owner of a file/directory → chown -R username filename. -R is for recursive it will change all the files and directory inside. Ex. chown -R rkadm ngrc.
Change grp of a file/directory → chgrp -R groupName fileName. Ex.chgrp -R any ngrc.
Comments
Post a Comment