All commands (14,187)

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

pipe output to notify-send
you can put almost any command. $notify-send -t 0 "MOTD" "$(sed -n '/#^4/,/#$4/{/#^4\|#$4/!p}' motd2 | cut -d# -f2)" $notify-send -t 0 "readfile" "$(while read mess; do echo $mess;done < motd2)"

add lyrics

View Owner, Group & Permissions.
#Alias alias perm="stat -c '%n %U:%G-%a'" #Function perm() { for ll in $@; do stat -c "%n %U:%G-%a" "$ll"; done; }

Scan for nearby Bluetooth devices.
Scans local area for visible Bluetooth devices. Use 'hcitool inq' to discover the type of device it is. And use -i hciX option to specify the local Bluetooth device to use.

find large files

Check if your webserver supports gzip compression with curl

List all databases in Postgres and their (byte/human) sizes, ordering by byte size descending
Get a listing of all of your databases in Postgres and their sizes, ordering by the largest size first. Requires that you give the -d parameter a valid database name that you can connect to.

Display disk partition sizes
It is the same but more faster real 0m0,007s user 0m0,011s sys 0m0,000s with my solution real 0m0,038s user 0m0,044s sys 0m0,000s with your solution :)

generate random ascii shape(no x11 needed!)

Get all URLs from webpage via Regular Expression
Get all URLs from website via Regular Expression... You must have lynx installed in your computer to execute the command. --> lynx --dump "" | egrep -o "" - Must substitute it for the website path that you want to extract the URLs - Regular Expression that you wanna filter the website


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: