Check These Out
I often use it to find recently added ou removed device, or using find in /dev, or anything similar.
Just run the command, plug the device, and wait to see him and only him
You can use it to connect to remote windows machine and start some scritps that need user login
There's been so many ways submitted to get your external IP address that I decided we all need a command that will just go pick a random one from the list and run it. This gets a list of "Get your external IP" commands from commanlinefu.com and selects a random one to run. It will run the command and print out which command it used.
This is not a serious entry, but it was a learning exercise for me writing it. My personal favourite is "curl icanhazip.com". I really don't think we need any other ways to do this, but if more come you can make use of them with this command ;o).
Here's a more useful command that always gets the top voted "External IP" command, but it's not so much fun:
$ eval $(curl -s http://www.commandlinefu.com/commands/matching/external/ZXh0ZXJuYWw=/sort-by-votes/plaintext|sed -n '/^# Get your external IP address$/{n;p;q}')
Replace 'csv_file.csv' with your filename.
shell generate random strong password
Shows all block devices in a tree with descruptions of what they are.
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
The pstack command prints a stack trace of running processes without needing to attach a debugger, but what about core files? The answer, of course, is to use this command. Usage: gdbbt program corefile
For this hack you need following function:
$ finit() { count=$#; current=1; for i in "$@" ; do echo $current $count; echo $i; current=$((current + 1)); done; }
and alias:
$ alias fnext='read cur total && echo -n "[$cur/$total] " && read'
Inspired by CMake progress counters.
This will view the console and assumes the screen is 80 characters wide.
Use /dev/vcs2 for the next virtual console.. etc.