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:
Works in Ubuntu, I hope it will work on all Linux machines. For Unixes, tail should be capable of handling more than one file with '-f' option.
This command line simply take log files which are text files, and not ending with a number, and it will continuously monitor those files.
Putting one alias in .profile will be more useful.
The variable WIRELESSINTERFACE indicates your wireless interface
Note that this assumes the application is an SVN checkout and so we have to throw away all the .svn files before making the substitution.
exported files will get a .r23 extension (where 23 is the revision number)
change 24073 to your pid
Just find out the daemon with $ netstat -atulpe. Then type in his name and he gets the SIGTERM.
will display typedefs, structs, unions and functions declared in 'stdio.h'(checkout _IO_FILE structure). It will be helpful if we want to know what a particular header file will offer to us. Command 'cpp' is GNU's C Preprocessor.
Tuned for short command line - you can set the path to sessionstore.js more reliable instead of use asterixes etc.
Usable when you are not at home and really need to get your actual opened tabs on your home computer (via SSH). I am using it from my work if I forgot to bookmark some new interesting webpage, which I have visited at home. Also other way to list tabs when your firefox has crashed (restoring of tabs doesn't work always).
This script includes also tabs which has been closed short time before.
The curl command retrieve the HTML text containing the IP address. The grep command picks out the IP address from that HTML text.
Get your colorized grep output in less(1). This involves two things: forcing grep to output colors even though it's not going to a terminal and telling less to handle those properly.
-l outputs only the file names
-i ignores the case
-r descends into subdirectories
Replace * with any filename matching glob or an individual filename
This is useful for displaying a portion of a FILE that contains an error at line NUMBER
Useful to know, especially if you are dealing with output configurations in block size.
Tested on 'Red Hat'.
A good way to understand what you've let yourself in for. Potential project metric could be the count:
svn log | grep -c "bodge\|fudge\|hack\|dirty"
automatically add and remove files in subversion so that you don't have to do it through the annoying svn commands anymore
This is a simple but useful command to search for multiple terms in a file at once. This prevents you from having to do mutliple grep's of the same file.
Quick and easy way of validating a date format of yyyy-mm-dd and returning a boolean, the regex can easily be upgraded to handle "in betweens" for mm dd or to validate other types of strings, ex. ip address.
Boolean output could easily be piped into a condition for a more complete one-liner.