What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. 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.

Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

UpGuard checks and validates configurations for every major OS, network device, and cloud provider.

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:



May 19, 2015 - A Look At The New Commandlinefu
I've put together a short writeup on what kind of newness you can expect from the next iteration of clfu. Check it out here.
March 2, 2015 - New Management
I'm Jon, I'll be maintaining and improving clfu. Thanks to David for building such a great resource!

Top Tags



Commands by eastwind from sorted by
Terminal - Commands by eastwind - 71 results
echo lowercaseword | tr '[a-z]' '[A-Z]'
synclient TouchPadOff=0
synclient TouchPadOff=1
convert *.jpg File_Output.pdf
pdftk pg_000{1..9}.pdf cat output MyFile.pdf
2012-08-27 08:57:00
User: eastwind
Functions: cat

merge pdf from pg_0001.pdf until pg_0009.pdf into MyFile.pdf

mencoder YOUR_VIDEO.MTS -ovc xvid -xvidencopts bitrate=5000:pass=2 -demuxer lavf -sws 3 -mc 0 -fps 25 -ofps 50 -oac mp3lame -lameopts cbr:br=128 -o YOUR_VIDEO.avi
while x=0; do foo ; sleep 1 ; done
2012-07-11 13:22:21
User: eastwind
Functions: sleep

repeat a command every X seconds , output show the creation of partition image using fsarchiver, each line show the size of the image.

for img in *.png; do convert "$img" "$img.jpg" ; done
cat /etc/debian_version
2011-12-11 11:13:16
User: eastwind
Functions: cat

work on any debian based GNU/Linux distro

mplayer -af scaletempo=scale=1.5 foo.mp3
cat /dev/scd0 > ~/audio_image.iso
2011-09-24 15:29:27
User: eastwind
Functions: cat

you should umount /dev/cdrom before using this cli

dd if=/dev/cdrom of=~/cd_image.iso
2011-09-24 15:27:04
User: eastwind
Functions: dd

create an iso from your cd/dvd-rom device . You need to umount /dev/cdrom

before using the cli

cat $(ls -c | grep ogg | tac ) > directory/test.ogg
mkdir $(date +%Y_%m_%d)
fusermount -u ~/sshfs_mounted_directory
sudo deborphan | xargs sudo apt-get -y remove --purge
echo "scale=6;2048 / 2.345" | bc
echo Your_Chinese_Char | uniconv -encode Chinese-WB
2010-04-05 10:57:42
User: eastwind
Functions: echo

This CLI requiere the uniconv package that is provided with the yudit unicode editor .

The wubi86 is a way to type chinese far quicker than pinyin .

More infor on wikipedia : http://en.wikipedia.org/wiki/Wubizixing , http://www.yale.edu/chinesemac/wubi/xing.html

time Command >/dev/null
tr '\n' '\t' < inputfile
tr '\t' '\n' < inputfile
cut -f2 file.txt | cut -d " " -f1
texmacs --delete-font-cache
2010-03-14 13:30:54
User: eastwind

after installing new fonts ( tfm , pfb , cjk , truetype ... ) manually in your ~/.Texmacs/fonts , it doesn't always reload it properly , just refresh it by delete the old cache fonts

in sample output , I just installed TrueType Chinese CJK fireflysung fonts supports

/usr/sbin/dmidecode | grep -i "current speed"
ssh-keygen -T moduli-2048 -f /tmp/moduli-2048.candidates
2010-01-29 19:35:21
User: eastwind
Functions: ssh ssh-keygen

this command test the moduli file generated by the command ssh-keygen -G /tmp/moduli-2048.candidates -b 2048 . The test can be long depend of your cpu power , around 5 minutes to 30 minutes