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.

Universal configuration monitoring and system of record for IT.

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 xmuda from sorted by
Terminal - Commands by xmuda - 10 results
while [ 1 ]; do echo -e "220 ProFTPD 1.3.3c Server [ProFTPD] \nFAILED FTP ATTEMPT - PORT 21" | nc -vvv -l 21 >> /var/log/honeylog.log 2>> /var/log/honeylog.log; done
2013-07-16 19:05:37
User: xmuda
Functions: echo

[root@dhcppc1 windows]# cat /var/log/honeylog.log

Connection from port 21 [tcp/ftp] accepted

Connection from port 21 [tcp/ftp] accepted

[root@dhcppc1 windows]# nc 21

220 ProFTPD 1.3.3c Server [ProFTPD]


*You can not run it if you have activated the ftp server.

firefox imacros://run/?m=macros.iim &
lynx --dump twitter.com/(username) | sed -n "132,134 p"
2013-07-06 16:28:10
User: xmuda
Functions: sed

I was using some twitter bots and twitter bloks my IP. Now im using some proxys and i use these command to validate the tweet was published.

ssh -X -l user
2013-04-30 13:48:28
User: xmuda
Functions: ssh

One time you logged in, you can prove these method just writing "firefox".

sleep 10; poweroff
2013-04-13 22:07:15
User: xmuda
Functions: sleep

If you are on your bed, waching a movie or if you are downloading something, but you whant to sleep. You can use these easy command to power off after X time. The time is in sec. if you whant to wait 1 H, use:

sleep 3600; poweroff

for a in $(seq 5 8); do cat twit.txt | cut -d " " -f$a | grep "^@" | sort -u; done > followlst.txt
2013-03-29 21:07:09
User: xmuda
Functions: cat cut grep seq sort

Go to "https://twitter.com/search/realtime?q=%23TeamFollowBack&src=hash" and then copy al the text on the page. If you scroll down the page will be bigger. Then put al the text in a text file called twit.txt

If you follow the user there is a high probability the users give you follow back.

To follow all the users you can use an iMacros script.

if lynx --dump http://twitter.com/xmuda | grep -q "Sorry, that page does"; then echo "Dont Exist"; else echo "Exist"; fi
2013-03-23 16:12:24
User: xmuda
Functions: echo grep

I use these command to validate twitter accounts, we can use a "for a in $(cat list.txt)" to validate a complete list of twitter accounts.

true | mailx -n -a MYTEXT.txt -r my@mail.com -s log -S smtp=mail.com -S smtp-auth-user=MYUSER -S smtp-auth-password=MYPASSWORD FRIEND@mail.com
2013-03-12 16:37:30
User: xmuda
Functions: mailx true

It is the best way i found to send a mail from the console in my centos server.

lynx --dump http://en.trending-topic.com/countries/Mexico/ | grep "62]#" | sed 's/\[62\]//g'
2013-03-12 16:25:14
User: xmuda
Functions: grep sed

In these command i use lynx to get the top trend topic of Mexico, if you replace Mexico with other country, you will get the #1 Trending topic

su -c 'sync; echo 3 > /proc/sys/vm/drop_caches'