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 Dhinesh from sorted by
Terminal - Commands by Dhinesh - 13 results
scp [email protected]|ipaddress:/directory/path .
2013-10-23 12:35:18
User: Dhinesh
Functions: scp
Tags: scp

scp [email protected]:/directory/path .

Get the file from the remote system

zipinfo -l <pathtozipfile>
sudo iptables -I INPUT -p tcp --dport 3000 -j ACCEPT
2011-12-16 10:39:13
User: Dhinesh
Functions: iptables sudo
Tags: iptables

This command will open tcp port 3000 in your machine

tune2fs -m 1 /dev/sda6
2011-12-07 10:20:01
User: Dhinesh
Functions: tune2fs
Tags: tune2fs

This command changes the reserved space for privileged process on '/dev/sda' to 1 per cent.

sudo ethtool -i eth0
2011-12-01 13:48:09
User: Dhinesh
Functions: sudo
Tags: ethtool

Queries the specified ethernet device for associated driver information

tput setf 4
2011-11-22 11:42:48
User: Dhinesh
Functions: tput
Tags: terminal

This will change your terminal foreground colour.Depending on the system, tput uses the terminfo or termcap database, as well as looking into the environment for the terminal type.

You can use "setb" to set terminal background colour

sudo cpulimit -p pid -l 50
2011-11-21 08:43:57
User: Dhinesh
Functions: sudo
Tags: cpu

This will limit the average amount of CPU it consumes.

gpg -c <filename>
2011-11-21 06:26:59
User: Dhinesh
Functions: gpg
Tags: Security

This will encrypt your single file and create a filename.gpg file.

Option: * -c : Encrypt with symmetric cipher

To decrypt

[email protected]:~$ gpg -c sample.rb.gpg

fping -g -r 1 | grep -v unreachable | awk '{print $1}'
sudo update-rc.d <scriptname> defaults
2011-11-19 08:55:38
User: Dhinesh
Functions: sudo
Tags: Ubuntu

This script will run each time you boot up.The script must be in /etc/init.d directory.

nmap -v -sT
2011-11-19 07:06:52
User: Dhinesh

TCP Connect scanning for localhost and network

tar xfz filename.tar.gz -C PathToDirectory
2011-11-17 12:43:56
User: Dhinesh
Functions: tar
Tags: tar.gz

The command extracting the tar contents into particular directory ...

mkdir /home/dhinesh/dir1/{dir2,dir3,dir4}/file1.txt -p