Couple of more bash commands…

Get your external IP address and other infos…
curl ifconfig.me
curl ifconfig.me/ip -> IP Adress
curl ifconfig.me/host -> Remote Host
curl ifconfig.me/ua ->User Agent
curl ifconfig.me/port -> 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)

g33kadmin

I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.