Friday, November 23, 2012
Unix commands
1.Delete a file:
rm filename
2.Delete a directory and its contents
rm -rf directoryName/
3.To give permission to execute:
sudo chmod 755 jdk-6u21-linux-i586.bin
4.Copy to remote system
scp -r /home/rocky/ROOT15Sep.war user@192.168.0.60:/home/user/
4.To change user password:
passwd rocky
[enter new paasword]
5.Find and kill jboss process
ps -ef | grep jboss
sudo kill -9 6789
6.Rename system name
http://www.makeuseof.com/tag/change-computer-ubuntu-1010/
7. text search in files under a folder
find myDir -type f -name *.txt -exec grep "hello" {} /dev/null \;
Note: Here search text is "hello", folder is "myDir", file name is in the format "*.txt"
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment