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

python - covert image to base64 string for data URI use
useful if you are using lots of data URI's in your css files

Determine command type (alias, keyword, function, builtin, or file)
Prints a string indicating whether a command is an alias, keyword, function, builtin, or file. I have used this in my BASH scripts to allow an external parameter to define which function to run, and ensure that it is a valid function that can indeed be run.

Download all images on a 4chan thread

Then end of the UNIX epoch
http://en.wikipedia.org/wiki/Year_2038_problem Some other notable dates that have passed: $ date -d@1234567890 $ date -d@1000000000

Google text-to-speech in mp3 format
same but redirecting to player and putting whaever text line.. works on my ubuntu machine ...

Extract the contents of an RPM package to your current directory without installing them.
This assumes you have the 'rpm', 'rpm2cpio' and 'cpio' packages installed. This will extract the contents of the RPM package to your current directory. This is useful for working with the files that the package provides without installing the package on your system. Might be useful to create a temporary directory to hold the packages before running the extraction: $ mkdir /tmp/new-package/; cd /tmp/new-package

Check the hard disk vendor and model on Apple Mac

reapair all mySQL/mariaDB databases
while dumping database if you see following error/warning than you have to repair broken tables/rows

Get a regular updated list of zombies
Shows all those processes; useful when building some massively forking script that could lead to zombies when you don't have your waitpid()'s done just right.

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


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: