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:
regex to match an ip
replace @ symbol with new line character, to get new line character press Ctrl+v+enter --> ^M
This directly puts the "mirror" into fullscreen, and lets you take photos by pressing the 's' key. I bet appearance conscious people will have keyboard shortcut for this command by now.
You need to install the package wajig.
I find the ouput of ls -lR to be un-satisfying (why is the path data up there?) and find syntax to be awkward. Running 'du -a' means you will have likely to trim-off filesize data before feeding filenames to the next step in the pipe.
Flips the y-axis to emulate a real mirror, uses low resolution for speed, this will also hide blemishes and the like :)
Quick command to test your webcam. Press 'f' to toggle fullscreen. Can also use 'vlc v4l2://' if you want gui controls. For higher/smoother framerate lower the default resolution:
cvlc v4l2:// :v4l2-width=320 :v4l2-height=240 &
Record audio to an MP3 file via ALSA. Adjust -i argument according to arecord -l output.
Shorten any Url using bit.ly API, using your API Key which enables you to Track Clicks
I have it as a Function in my .bash_aliases
Here is an Output showing the Function Detail..
bijay@bijay:$ type shorten
shorten is a function
yes 6 (tail from 6th line)
Open a window that displays camera capture.
Framerate, width and height may be changed to match your needs.
I have a directory containing log files. This command delete all but the 5 latest logs. Here is how it works:
* The ls -t command list all files with the latest ones at the top
* The awk's expression means: for those lines greater than 5, delete.
Use of hotcopy for safety/stability of the backups.
It deletes all removed files, updates what was modified, and adds new files.
Returns a JSON object, by connecting to the 'test' endpoint of the Twitter API. Simplest way to check if you can connect to Twitter. Output also available in XML, use '/help/test.xml' for that
This command dumps all SVN repositories inside of folder "repMainPath" (not recursively) to the folder "dumpPath", where one dump file will be created for each SVN repository.
Record audio to MP3 stream and video to MPEG-4 stream from webcam to AVI file using mencoder. Gives floating point exception in some mencoder versions.
View webcam output using mplayer, with correct fps and outfmt settings according to my webcam model.