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

preserve disk; keep OS clean
if you use disk-based swap then it can defeat the purpose of this function.

This command provides more color variety for the rainbow-like appearance by generating random color codes from 16 to 231 for adb logcat.

Generate a random password 30 characters long
This command is similar to the alternate, except with head(1), you can pick as many passwords as you wish to generate by changing the number of lines you wish to preview.

Prepare a commandlinefu command.
This command will format your alias or function to a single line, trimming duplicate white space and newlines and inserting delimiter semi-colons, so it continues to work on a single line.

Detect illegal access to kernel space, potentially useful for Meltdown detection
Based on capsule8 agent examples, not rigorously tested

Massive change of file extension (bash)
Using bash parameters expansion

Calculate the distance between two geographic coordinates points (latitude longitude)
The Haversine formula determines the great-circle distance between two points on a sphere given their longitudes and latitudes.

Calculate days on which Friday the 13th occurs (inspired from the work of the user justsomeguy)
Friday is the 5th day of the week, monday is the 1st. Output may be affected by locale.

See a full list of compiler defined symbols
From http://lists.debian.org/debian-devel/2001/01/msg00971.html .

Diff files over SSH
Sometimes you need to compare two config files on different servers. Put the file names into the above script and let 'er rip.


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: