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

Encryption file in commad line
This will encrypt your single file and create a filename.gpg file. Option: * -c : Encrypt with symmetric cipher To decrypt dhinesh@ubuntu:~$ gpg -c sample.rb.gpg

creating you're logging function for your script
You could also pipe to logger.

Size(k) of directories(Biggest first)
somewhat faster version to see the size of our directories. Size will be in Kilo Bytes. to view smallest first change '-k1nr' to '-k1n'.

Watch the progress of 'dd'
Pressing ctrl-t will display the progress

Explanation of system and MySQL error codes
perror should be installed if mysql-server package is installed

Show what PID is listening on port 80 on Linux

sort the contents of a text file in place.
sorts the contents of a file without the need for a second file to take the sorted output. This was previously entered as `sort -g list.txt -o $_` but as others have pointed out the $_ references the previous command. so this would've worked had that been the second part of a command joined with && like: cat list.txt && sort -g list.txt -o $_ The user below me Robin had the most correct command.

Create a progress bar over entire window until we count to 1000
https://wuseman.nr1.nu:8080/file/E8AcLVgMPZ2LSJQf/9BD8V8ADYNhR6cca/parallel_print_progress.gif

Binary clock
Fun idea! This one adds seconds and keeps running on the same line. Perl's probably cheating though. :)

Big Countdown Clock with hours, minutes and seconds
Figlet is easy to find for download on the internet, and works for any text. Quite cool.


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: