Last active
August 29, 2015 14:00
-
-
Save muthuishere/11290075 to your computer and use it in GitHub Desktop.
Unix Cheatsheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#To get folder size solaris | |
du -h | tail -1 | |
# To Zip a folder r stands for recursive | |
zip -r tmp.zip /opt/xxx/YYZ/ | |
#To Untar Linux | |
tar -xzvf ftpserver-1.0.0.tar.gz | |
#to tar gz solaris | |
tar cf - dsef.94.0.0/ | gzip -c > dsef_1.94.0.tar.gz | |
#To Untar Solaris | |
gunzip -c ftpserver-1.0.6.tar.gz |tar xvf - | |
#Wget Solaris | |
/usr/sfw/bin/wget | |
#To Download file/folder from ftp | |
wget -r -nH --cut-dirs=5 -P$localpath \ -nc ftp://USER_NAME:PASSWORD@HOST/$remotepath | |
# To create alias for bash shell , in file .bashrc | |
# alias command in the below files | |
# .bahsrc | |
# .bash_profile | |
alias aiasname='cd /xxx/opt/staging/log' | |
#To Send Email Attachment | |
echo "Sending an attachment." | mutt -a file.zip -s "attachment" target@email.com | |
#To search for text within process | |
ps -ef | grep GLReportFileCreator | |
#To search text within folders | |
find . -name '*' -print|xargs grep '/usr/txs/tomcat7' 2>/dev/null | |
#to Locate file name | |
locate -b log4j* | |
#Change owner of directory with Recursive | |
chown -R username somedir | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment