Commands using sort (800)

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

convert single digit to double digits
each number in a file name gets expanded to the number of digets provided as arg_1 of the arguments in rjust_file_nums. Put the funciton in the .bashrc file. Be sure to $ source ~/.bashrc so that the function will be accessible from bash.

watch your network load on specific network interface
-n means refresh frequency you could change eth0 to any interface you want, like wlan0

Outputs a sorted list of disk usage to a text file
Recursively searches current directory and outputs sorted list of each directory's disk usage to a text file.

Analyze awk fields
translate and number lines is simpler and you use tr to choose your delimiter (eg for csv files)

Extract icons from windows exe/dll
wrestool can be found in icoutils (http://www.nongnu.org/icoutils)

Print macOS current power delivery max wattage
Print the max wattage of the current power draw source for a Mac. Note that the current amount of watts drawn may be lower, particularly if a high-wattage adapter is plugged into a Mac that has a full battery.

download a sequence of vim patch
Seq allows you to define printf like formating by specified with -f, %03g is actually tells seq I got three digits, fill the blank digits with 0, and the range is from 176 to 240.

Easily decode unix-time (funtion)
More recent versions of the date command finally have the ability to decode the unix epoch time into a human readable date. This function makes it simple to utilize this feature quickly.

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously

Rename files in batch


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: