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

Write a bootable Linux .iso file directly to a USB-stick
Writes hybrid ISO directly to USB stick; replace /dev/sdb with USB device in question and the ISO image link with the link of your choice

See your current RAM frequency
man dmidecode [look for type]

Find out current working directory of a process

Create a new file

Test speaker channels
Useful tool to test if all speaker channels are working properly. speaker-test is part of alsa-utils package

Tell what is encoded in a float, given its HEX bytes
It handles all possible combination of the hex bytes, including NaNs, Infinities, Normalized and Subnormal Numbers... $ This crazy DC stuff spent me a few days to write, optimize, polish and squeeze so that it works within the tight 255 character bound... $ You can modify it easily for other IEEE754 numbers, say, half, double, double-extended, quadruple $ (I hope someone will find this useful and submit more dc code to commandlinefu!)

Slow Down Command Output
( Or $ ls -lat|lolcat -a if you like it in technicolor - apt install lolcat if needed )

Merge bash terminal histories

Move a folder and merge it with another folder
This will move a folder and merge it with another folder which may contain duplicates. Technically it's just creating hardlinks of everything in the folder, and after it's done, delete the source (with rm -r source/ ) to complete the move. This is much faster than, for example, using rsync to merge folders which would actually copy the entire contents and so for a lot of files would take much longer. This uses macutils gcp port of cp so it can be used on osx/MacOS. If using in linux or some unix where cp includes the ability to create links with -l you can just use cp instead of gcp.

Print ASCII Character Chart
Prints out an ascii chart using builtin bash! Then formats using cat -t and column. The best part is: $ echo -e "${p: -3} \\0$(( $i/64*100 + $i%64/8*10 + $i%8 ))"; From: http://www.askapache.com/linux/ascii-codes-and-reference.html


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: