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.

Universal configuration monitoring and system of record for IT.
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

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!
Hide

Top Tags

Hide

Functions

Hide

Credits

Commands by flart from sorted by
Terminal - Commands by flart - 9 results
reset
2009-11-09 16:15:26
User: flart
Functions: reset
1

If something fracks up your terminal, just type in 'reset' and everything should be good again.

aptitude install bash-completion ; source /etc/bash_completion
2009-10-07 09:27:02
User: flart
Functions: install
3

The really awesome bash completion in debian seems to be an extra package now, which has to be installed. After sourcing /etc/bash_completion it completes almost everything (package names in apt... etc) :-)

To make this permanent, put something like this in your .bashrc:

if [ -f /etc/bash_completion]; then

source /etc/bash_completion

fi

host A: cat /proc/dev/ttyS0 host B: echo hello > /dev/ttyS0
2009-09-24 13:22:23
User: flart
Functions: cat echo host
2

If the connection works you should see a "hello" on host A. If not: check your cabeling etc :-)

ssh-keygen -R `host hostname | cut -d " " -f 4`
2009-09-23 14:58:28
User: flart
Functions: cut hostname ssh ssh-keygen
5

Quick shortcut if you know the hostname and want to save yourself one step for looking up the IP address separately.

screen -x
2009-09-09 11:30:56
User: flart
Functions: screen
5

Force the user you want to watch doing things into doing his things in a screen session. Then simply attach yourself to that session with the command shown above.

Works only if you are on the same machine, of course

kpartx -a /dev/mapper/space-foobar
2009-07-01 09:53:33
User: flart
1

kpartx can be found inside of the multipath-tools package

-a adds the mappings and -d deletes them

mii-tool eth0
2009-06-24 08:43:55
User: flart
6

with 'mii-tool -w eth0' you can watch the interface for changes of the link status

lshw -html > hardware.html
2009-06-04 07:14:03
User: flart
28

After the command is done, open the html file in a browser

ssh-copy-id username@hostname