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:
Streams youtube-dl video to mplayer.
syt 'youtube.com/link' 'anotherlinkto.video'
Uses mplayer controls
This simple command will copy a DVD losslessly to your drive and remove the encryption.
Just give it an artist and/or song at the end of the command as shown.
Useful for when you download movies split into < 700mb parts.
mencoder is generally included with mplayer.
sudo port install mplayer
If you want avoid to be annoyed when playing your favourite video files with your video player, first run this command to stash wrong files (and test tricks to play these wrong files).
Above command will play Virgin Radio Dubai
It will just start playing and will not stop at the point that it has downloaded up to when the video starts
Improvement on Coderjoe's Solution. Gets rid of grep and cut (and implements them in awk) and specifies some different mplayer options that speed things up a bit.
Creates a better looking gif than the original post via imagemagick processing high quality jpgs, rather than converting directly to gif from the video itself.
Better awk example, using only mplayer, grep, cut, and awk.
And I thought it would be cool to make it so that it will play songs in subdirectorys too.
Google text-to-speech in your local language or in language of choice via country code switch (ISO 639-1).
Usage: say hello world how are you today
say "hello world"
this command example converts to 25 fps subtitles that were originally created for 24 fps movie
Works really well for playing DVDs, which have the volume turned way down for some reason. The `2' method is better IMHO because it will adjust to changing loud/soft parts.
If you want to add it to your ~/.mplayer/config:
# format: volnorm[=method:target]
# 1: use single sample (default)
# 2: multiple samples
# default is 0.25
Skip forward and back using the < and > keys. Display the file title with I.
requires sp-auth installed
This command will auto kill sp-sc after vlc is closed, so u wont have to do it manually
It's made for a script use, where you have 3 parameters:
1. parameter is the filename
2. (optional) the encoding for subtitles
3. (optional) the scaling of the video, since fullscreen doesn't mean that the video will be scaled.
The solution to a year long (and extremely frustrating) problem I've had, caused by the fact that I only have one speaker; this command downmixes the stream to monophonic output, making sure I don't miss any of the music.
NOTE: When stream is in .m3u format, a -playlist option is required, as shown below:
mplayer -af pan=1:0.5:0.5 -channels 1 -playlist radiostream.m3u
This command works great with aliases for various channels in .bashrc. Sample below:
alias radio1='mplayer -af pan=1:0.5:0.5 -channels 1 radio1stream.pls'
Is a simple script for video streaming a movie