Skip to content

Instantly share code, notes, and snippets.

@codingPingjun
Last active May 20, 2017 01:19
Show Gist options
  • Save codingPingjun/440a1596cce1529b8123c66369e7bf59 to your computer and use it in GitHub Desktop.
Save codingPingjun/440a1596cce1529b8123c66369e7bf59 to your computer and use it in GitHub Desktop.
Linux Command

0. Command help

man cd

1. Find string "abc" in subfolders

grep -rin "abc" .

2. Search specified file

locate abc.txt

3. Unzip compressed file

tar -zxvf abc.tar.gz

tar -jxvf abc.tar.bz2

4. Build soft link

ln -s target link-name

5. Secure copy

scp your_username@remotehost.edu:foobar.txt /some/local/directory

scp foobar.txt your_username@remotehost.edu:/some/remote/directory

6. Kill port

sudo lsof -t -i:6006

sudo kill -9 pid

7. User of PID

ps -u -p pid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment