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/
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:
Use ^D instead of exit.
Also ^D ends input stream when you use terminal for typing into standard input.
Dumps a MySQL database over a compressed SSH tunnel and uses it as input to mysql - i think that is the fastest and best way to migrate a DB to a new server!
-nohttpd don't run mini-httpd if VNC java applet is found
-name change the name of the desktop, it's passed to xstartup script via $VNCDESKTOP, run different set of apps acording the name.
-depth pixel depth in bits of the desktop, default is 16
-geometry size of the desktop, default is 1024x768
If you use symlinks a lot, especially nested symlinks, this puts you back on the absolute path to command-line-fu-nirvana. (Note the backticks around pwd).
Or just do history -w before opening another terminal.
cat file1 file2 file3|sort|uniq -d
finds the same lines in several files, especially in files with lists of files.
Simply change your web browser's proxy settings to point to a SOCKS proxy at port 8888 and you're good to go.
Kill -9 immediately kills the given process number. $$ is the process ID of the process you are in.
finds all forms instanciated into a symfony project, pruning svn files.
how to get full cpu info of your (linux) box
Get simple description on each file from /bin dir, in list form, usefull for newbies.
# Small for loop, that can list files in dir, and after that executes
# [COMMAND] of your choice, usefull for example rename, move, tar etc..
# change cmd's for different results :)
From the other machine open a web navigator and go to ip from the machine who launch netcat, http://ip-address/
If you have some web server listening at 80 port then you would need stop them or select another port before launch net cat ;-)
* You need netcat tool installed
when your terminal session seems unrensponsive (this normally happen after outputting some binary data directly on your standard output) it may me saned by hitting:
CTRL+J tput sgr0 CTRL+J
Note: don't press the Enter key, just ctrl+j
or, to process a single directory:
for f in *; do mv $f `echo $f |tr '[:upper:]' '[:lower:]'`; done