Get Google Reader unread count from the command line.
You'll have to define your auth token with $auth
Or use:
curl -s -H "Authorization: GoogleLogin auth=$(curl -sd "Email=$email&Passwd=$password&service=reader" https://www.google.com/accounts/ClientLogin | grep Auth | sed 's/Auth=\(.*\)/\1/')" "http://www.google.com/reader/api/0/unread-count?output=json" | tr '{' '\n' | sed 's/.*"count":\([0-9]*\),".*/\1/' | grep -E ^[0-9]+$ | tr '\n' '+' | sed 's/\(.*\)+/\1\n/' | bc
Show Sample Output
This is a dirty raw way to simply list ELF objects in a folder. The output is ready to be parsed i.e to the stripper or what else needs a path to an ELF object. Show Sample Output
open a new tab in active gnome-terminal instance needs sudo apt-get install xdotool and sudo apt-get install wmctrl
Removes the given string from all files under the given path - in this case the path given is "." This demonstrates the characters that must be escaped for the grep and sed commands to do their work correctly. Very handy for fixing hacked html files.
1.) my profile ends with $USER not with .default 2.) only grep for the first occurrence because some extensions have the translated name also inside the install.rdf Show Sample Output
This is helpful if you connect to several networks with different subnets such as 192 networks, 10 networks, etc. Cuts first three octets of ip from ifconfig command and runs nmap ping scan on that subnet. Replace wlan0 with your interface. Assumes class c network, if class b use: cut -d "." -f 1-2 and change nmap command accordingly.
Shows useful informations about file descriptors in Squid web proxy Show Sample Output
Tail all logs that are opened by all java processes. This is helpful when you are on a new environment and you do not know where the logs are located. Instead of java you can put any process name. This command does work only for Linux.
The list of all log files opened by java process:
sudo ls -l $(eval echo "/proc/{$(echo $(pgrep java)|sed 's/ /,/')}/fd/")|grep log|sed 's/[^/]* //g'
Output the html from xkcd's index.html, filter out the html tags, and then view it in gwenview. Show Sample Output
Based on: http://stackoverflow.com/questions/746684/how-to-search-through-all-commits-in-the-repository It would be good if anyone can shorten this to eliminate the duplicate query string. Show Sample Output
use this to avoid executing the target app
Just added view with the eog viewer.
Get just the IP address for a given hostname. For best results, make this a function in your shell rc file so that it can be used for things like traceroute: Titus:~$ traceroute `getip foo.com` traceroute to 64.94.125.138 (64.94.125.138), 64 hops max, 52 byte packets Show Sample Output
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: