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.
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.
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.
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:
Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:
Use tee -a to append.
do it, disown it and exit without time for a mess
sudo when you mean it
ps aux | grep $USER
Creates a temporary ram partition
to make a 3gb partition (Defaults to 1gb)
This command will ask for remote sudo password before executing a remote command.
you will be sad after you run a command and find out it needs root, so you should run it again but with prefix sudo.
so this line is to make it simple. just 'sudo !!'
If you want to carry on your aliases while using sudo, put this into a file which will be parsed when logging in.
shorthand for sudo save
Calls sudo tee like all the other lines, but also automatically reloads the file.
Optionally you can add
command Wq :execute ':W' | :q
command WQ :Wq
to make quitting easier
probably just like 1204, but uses tee as a filter (+ I actually understand how this one works)
Should run with sudo
Will limit the amount of CPU time Grooveshark the greedy yet useful Adobe Air app will have.
Leaves the UI lagging a little, but crucially does not ruin the audio.
a simple command in order to make iptables rules permanent, run @ sudo!
Destination IPs will become invisible to source IPs!
Run program as root by SSH key forwarding instead of sudoers.
Put this alias line in .bashrc or wherever you like. Alias arguments might need extra escaping.
You might wonder about security. But you'd block out root login as much as possible of course. In sshd_config you put this:
Match Address 127.0.0.1
"The -b (background) option tells sudo to run the given command in the background." -- after it asks you for the password in the foreground.
Take advantage of sudo keeping you authenticated for ~15 minutes.
The command is a little longer, but it does not require X (it can run on a headless server).
Need package: gksu
Launching gui app in background that needs sudo, won't work great with our old
friendly style of launching:
sudo gedit /etc/passwd &
because this would put sudo in background !
Using gksudo as demonstrated, would popup a gui sudo window.
May be this is a common knowledge, but not knowing this
frustrated me during my newbie year.