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

find external links in all html files in a directory list
Just a handy way to get all the unique links from inside all the html files inside a directory. Can be handy on scripts etc.

Image to color palette generator
Extract a color palette from a image useful for designers. Example usage: $extract-palette myawesomeimage.jpg 4 Where the first argument is the image you want to extract a palette from. The second argument is the number of colors you want. It may be the case where you want to change the search space. In that case, change the -resize argument to a bigger or smaller result. See the ImageMagick documentation for the -resize argument.

Show me just the ip address
Sometimes it's useful to output just the ip address. Or some other information, changing the "ipv4.addresses" in command. The power of awk! Show all possible "greps" with $ nmcli connection show [yourInterfaceNameHere]

Remove EXIF data from images with progress

check open ports without netstat or lsof

Encrypted chat with netcat and openssl (one-liner)
client$ while true; do read -n30 ui; echo $ui |openssl enc -aes-256-ctr -a -k PaSSw ; done | nc localhost 8877 | while read so; do decoded_so=`echo "$so"| openssl enc -d -a -aes-256-ctr -k PaSSw`; echo -e "Incoming: $decoded_so"; done This will establish a simple encrypted chat with AES-256-CTR using netcat and openssl only. More info here https://nixaid.com/encrypted-chat-with-netcat/

Connect to FreeWifi hotspot (France) and keep the connection active
(In French) Connection aux hotspots FreeWifi, et maintien de la connection active

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

apt-get upgrade with bandwidth limit
Trickle is here: http://monkey.org/~marius/pages/?page=trickle Trickle is a simple bandwidth limiter

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"


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: