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:
list what applications using what ports
these are some aliases you can use in bashrc to shorten the amount of typing needed to use apt-get, also can be used as reference if you can't remember alot of commands or command parameter variations,etc...
Please comment with more apt-get aliases if I missed any, thx
alias for editing .bashrc and sourcing it with a quick command, very useful for quickly adding and modifying alias' and functions in bashrc, create lots of alias from commandlinefu very quickly, use nano vim or any other edit if you want, very useful if you have a barcode scanner and you want to run commands quickly with barcodes
When you have to manage lot of servers, it's boring to type ssh root@myhost for each connection. Now you can type juste "s someting" and you are connected.
You can too add bash_completion script to complet with tab the name of your servers. This will be the next tips from me ;)
Reads in the ~/.Xdefaults lexicographically sorted with, instead of replacing, the current contents of the specified properties.
This is the alias command that I discussed in my prior release which you can add to your ~/.bashrc.
This command asks for the station name and then connects to somafm, Great for those who have linux home entertainment boxes and ssh enabled on them, just for the CLI fiends out there ( I know I'm one of them ;)
You can find future releases of this and many more scripts at the teachings of master denzuko - denzuko.co.cc.
A short way to give us relevant report in a moment done about quantities on disk usage, memory and swap in our Linux Systems.
typing history it's a long way but typing only h it's my way it works in whatever distro or OSes or shells that you use, you know, only for easyness :)
This is a simple command, but extremely useful. It's a quick way to search the file names in the current directory for a substring. Normally people use "ls *term*" but that requires the stars and is not case insensitive. Color (for both ls and grep) is an added bonus.
Add this to .bashrc, then you can quickly create backups from files on current directory, but it only backups files on current directory.
useful when changing config files, coding something or just trying something stupid.
rot13 maps a..mn..z (A..MN..Z) to n..za..m (n..za..m) and so does this alias.
create a short alias for 'ls' with multi-column (-C), file type syntax additions (slashes after directories, @ for symlinks, etc... (-F), long format (-l), including hidden directories (all ./, ../, .svn, etc) (-a), show file-system blocks actually in use (-s), human readable file sizes (-h)
I got really tired of having tree always show me tons of .svn and .git stuff that I don't care about. With this alias, "tree" uses pretty colors, snazzy line graphics, and ignores any source control and package mumbojumbo. (Customize the *.*.package glob, of course.)
parses the output of ifconfig to show only the configured ip address (in this case from interface eth0).
the regexp is quick'n'dirty im sure it can be done in a better way.
--> this alias does not show your "internet ip" when you're in a nat-environment
An alias i made for myself to play music in a faster way.
Works great when you have Guake / Tilda installed (Console that drops down like in the game QUAKE)
I put this in my bash_alias file (I'm on ubuntu, the bash_alias file does autostart with the right config) but it works putting it in bashrc too. Or anything that autostarts when the console is opened.
Needs Mplayer and music files to work. With out music theres nothing to play!
Oh, and also, without modification, this alias will try to play stuff from your ~/Music folder! (case sensitive). Make sure that folder exists and has music OR edit this alias to fit your needs.
Just type 'opened' and get all files currently opened for edit.
By 'pst' you can print out process tree with all details about all processes (including a command line, PID, and the current process you are running in).
By 'pst username' you can get an information about processes belonging to the particular user 'username'.
Alias two dots to move to parent directory. Put it into your .bashrc or .profile file.
change ":" in path for new line and associate word path to var $PATH