https://github.com/v2e4lisp/note
https://github.com/v2e4lisp/note
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/v2e4lisp/note
- Owner: v2e4lisp
- Created: 2015-09-26T14:56:48.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-09T01:15:37.000Z (over 10 years ago)
- Last Synced: 2025-06-22T19:02:57.126Z (12 months ago)
- Size: 156 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# note
* `sort | uniq -c | sort -nr` count ocurrence of each line and sort them
* `perl -pi -w -e 's/foo/bar/g' **/*` replace foo to bar recursively
* `ps euxf` detail process(tree) info
* `git log -p [filename]` show file's change history
* lsof -n -i4TCP:$PORT | grep LISTEN [Who is listening on a given TCP port on Mac OS X?]http://stackoverflow.com/questions/4421633/who-is-listening-on-a-given-tcp-port-on-mac-os-x
run a shell script on remote host without copying. [SO: how to use ssh to run shell script on a remote machine?](http://stackoverflow.com/questions/305035/how-to-use-ssh-to-run-shell-script-on-a-remote-machine)
```sh
ssh user@host 'bash -s' <<<-'SCRIPT'
# shell script
SCRIPT
```
# tutorials
* [how to setup a basic iptables firewall on centos6](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-basic-iptables-firewall-on-centos-6)