A collection of inspiring lists, manuals, cheatsheets, blogs, hacks, one-liners, cli/web tools and more.
awesomeawesome-listbsdcheatsheetsdevopsguidelineshackinghackshowtoslinuxlistsmanualsone-linerspentestersresourcessearch-enginessecuritysecurity-researcherssysops
minor fixes - signed-off-by: trimstray <[email protected]>
trimstrayd9aaa77cf5f6
diff --git a/README.md b/README.mdindex 2d21813..ed43b3d 100644--- a/README.md+++ b/README.md@@ -1225,8 +1225,8 @@ rm !(*.foo|*.bar|*.baz)###### Pass multi-line string to a file```bash-# cat >filename ... - overwrite file-# cat >>filename ... - append to file+# cat >filename ... - overwrite the file+# cat >>filename ... - append to a filecat > filename << __EOF__data data data__EOF__@@ -1294,7 +1294,7 @@ for ((i=5; i<=10; ++i)) ; do printf '%02d\n' $i ; donefor i in {1..10} ; do echo $i ; done```-###### Simple Bash Filewatching+###### Simple Bash filewatching```bashunset MAIL; export MAILCHECK=1; export MAILPATH='$FILE_TO_WATCH?$MESSAGE'@@ -1323,12 +1323,29 @@ ___##### Tool: [fuser](https://en.wikipedia.org/wiki/Fuser_(Unix))+###### Show which processes use the files/directories++```bash+fuser /var/log/daemon.log+fuser -v /home/supervisor+```+###### Kills a process that is locking a file```bash-fuser -k filename+fuser -ki filename+```++ * `-i` - interactive option++###### Kills a process that is locking a file with specific signal++```bash+fuser -k -HUP filename```+ * `--list-signals` - list available signal names+###### Show what PID is listening on specific port```bash@@ -1529,7 +1546,7 @@ ___top -p $(pgrep -d , <str>)```- * `<str>` - process containing str (eg. nginx, worker)+ * `<str>` - process containing string (eg. nginx, worker)___@@ -3063,7 +3080,6 @@ httpd.serve_forever()import BaseHTTPServer, SimpleHTTPServerimport ssl-httpd = BaseHTTPServer.HTTPServer(('localhost', 4443),SimpleHTTPServer.SimpleHTTPRequestHandler)@@ -3151,9 +3167,9 @@ sed ':a;N;$!ba;s/\n/ /g' /path/to/filesed -e ':a' -e 'N' -e '$!ba' -e 's/\n/ /g' /path/to/file```-- `:a` create a label 'a'+- `:a` create a label `a`- `N` append the next line to the pattern space-- `$!` if not the last line, ba branch (go to) label 'a'+- `$!` if not the last line, ba branch (go to) label `a`- `s` substitute, `/\n/` regex for new line, `/ /` by a space, `/g` global match (as many times as it can)Alternatives:@@ -3269,7 +3285,7 @@ Example:shell> DomainResolve nmap.orgnmap.org > 45.33.49.119-shell> DomainResolve nmap.orgs+shell> DomainResolve nmap.orgUnsuccessful domain name resolution.```