Commands by richard_ma (1)

What's this?

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.

Share Your Commands


Check These Out

Install pip with Proxy
Installs pip packages defining a proxy

Alternative size (human readable) of files and directories (biggest last)

Check whether laptop is running on battery or cable
If you want to do the same in OS X... grep as necessary for information you need....

ping MAC ADDRESS
# first install arp-scan if not have it arp-scan 10.1.1.0/24 .... show ip+mac in localnet awk '/00:1b:11:dc:a9:65/ {print $1}' .... get ip associated with MAC ` backtick make do command substitution passing ip to command ping

list block devices
Shows all block devices in a tree with descruptions of what they are.

See entire packet payload using tcpdump.
This command will show you the entire payload of a packet. The final "s" increases the snaplength, grabbing the whole packet.

Schedule a command while one is already running.
Useful when you have only one terminal session e.g. ssh. and want to queue up another command after the currently running has finished(in case if you forget to run that command). Originally used as ; python-updater when running emerge. When I have noticed that a package failed due to that command not run.

Simultaneously running different Firefox profiles
After running $ firefox -ProfileManager and creating several different profiles, use this command to run multiple Firefox profiles simultaneously.

list block devices
Shows all block devices in a tree with descruptions of what they are.

Printing multiple years with Unix cal command
print multiple increasing years using cal - calendar -. You can also try $seq Start Increment End


Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: