Last active
October 20, 2015 15:54
-
-
Save kurorido/d1be369b6b882eeef065 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
adduser mynewuser | |
sudo visudo | |
root ALL=(ALL:ALL) ALL | |
newuser ALL=(ALL:ALL) ALL |
This file contains hidden or 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
uname -a for all info regarding kernel version, | |
uname -r for exact kernel version | |
lsb_release -afor all information related to ubuntu version, | |
lsb_release -r for exact version | |
sudo fdisk -l for partition info with all details. | |
rsync -arv --exclude=.ccache --exclude=build /home/ben /media/ben/thumbdrive/ | |
http://www.tecmint.com/rsync-local-remote-file-synchronization-commands/ |
This file contains hidden or 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
## find out mount/partition a directory or file is on? | |
df -P file/goes/here | tail -1 | cut -d' ' -f 1 | |
# delete line 135 in file, and save origin file into file.bak | |
sed -i.bak -e '135d' file | |
# Recursive find string from files | |
grep -R -i -n '<string>' <directory> | |
# nohup | |
nohup your_command &>myout.txt & | |
tail –f nohup.txt | |
# kill process listening on port 23456 | |
sudo kill -9 `sudo lsof -t -i:23456` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment