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 tiagofischer from sorted by
Terminal - Commands by tiagofischer - 11 results
unhide (proc|sys|brute)
2010-12-16 13:05:10
User: tiagofischer
Tags: unhide

Unhide is a forensic tool to find processes and TCP/UDP ports hidden by rootkits, Linux kernel modules or by other techniques. It includes two utilities: unhide and unhide-tcp.

ps h -o pid,command | grep 'TEXT' | sed 's/^ \+//' | cut -d ' ' -f 1 | xargs -n 1 kill
ipcs -a | grep 0x | awk '{printf( "-Q %s ", $1 )}' | xargs ipcrm
sed -i -e 's/war/peace/g' *
2010-01-02 13:16:35
User: tiagofischer
Functions: sed

Replace the word 'war' to word 'peace' in every file in the current directory.

2009-12-09 12:30:00
User: tiagofischer
Functions: ipcs

Get information about Shared Memory Segments, Semaphore Arrays and Message Queues.


ipcs -u
2009-11-23 15:54:33
User: tiagofischer

CCZE is a robust and modular log coloriser, with plugins for apm, exim, fetchmail, httpd, postfix, procmail, squid, syslog, ulogd, vsftpd, xferlog and more.


tail -f /var/log/messages | ccze -A

tail -f /var/log/exim4/mainlog | ccze -A

2009-11-23 14:32:43
User: tiagofischer

This tool configures system services in connection with system runlevels. It turns on/off services using the scripts in /etc/init.d/.

Rcconf works with System-V style runlevel configuration.

It is a TUI(Text User Interface) frontend to the update-rc.d command.

2009-11-23 12:07:07
User: tiagofischer
Functions: lockfile

Programs for locking and unlocking files and mailboxes.This package includes several programs to safely lock and unlock files and mailboxes from the command line. These include:







These programs use liblockfile to perform the file locking and unlocking, so they are guaranteed compatible with Debian's file locking policies.

On target: "nc -l 4000 | tar xvf -" On source: "tar -cf - . | nc target_ip 4000"
2009-06-30 19:36:19
User: tiagofischer
Tags: tar nc

It bypasses encryption overhead of SSH and depending on configuration can be significantly faster.

It's recommended to use only in trusted networks.

netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
2009-03-28 21:02:26
User: tiagofischer
Functions: awk cut netstat sort uniq

Here is a command line to run on your server if you think your server is under attack. It prints our a list of open connections to your server and sorts them by amount.

BSD Version:

netstat -na |awk '{print $5}' |cut -d "." -f1,2,3,4 |sort |uniq -c |sort -nr
unzip \*.zip
2009-03-26 02:36:28
User: tiagofischer
Tags: unzip

"unzip *.zip" doesn't work as expected, because unzip handle wildcards in a different way.

You just need to escape the wildcard or do in another way:

for f in *.zip; do unzip "$f"; done