Couple of more bash commands…

Categories General Info

Get your external IP address and other infos…
curl -> IP Adress
curl -> Remote Host
curl ->User Agent
curl -> Port

intercept stdout/stderr of another process
strace -ff -e trace=write -e write=1,2 -p SOME_PID

Delete all files in a folder that don’t match a certain file extension
Deletes all files in a folder that are NOT *.foo, *.bar or *.baz files. Edit the pattern inside the brackets as you like.
rm !(*.foo|*.bar|*.baz)

Leave a Reply