Today's date on a yearly calendar... credits to http://lifehacker.com/250825/cli-fun--todays-date-on-a-yearly-calendar Show Sample Output
ip address show | grep eth0 | sed '1d' | awk '{print $2}'
does the same, but shows network-prefix.
create an archive of files with access time older than 5 days, and remove original files.
Uses the pid to get the full path of the process. Useful when you do not which command got picked from the path Show Sample Output
Affiche des infos detaillees sur vos connexions reseaux. Port en ?coute, protocole, paquets, adresses, ustilisateur, PID etc...
Permet de lire une video dans une console, meme sans interface graphique. Interet limite, mais a connaitre au cas ou.
Used for moving stuff around on a fileserver
echo "http%3A%2F%2Fwww.google.com" | sed -e's/%\([0-9A-F][0-9A-F]\)/\\\\\x\1/g' | xargs echo -e
http://www.google.com
Works under bash on linux. just alter the '-e' option to its corresponding equivalence in your system to execute escape characters correctly.
Pitch-correct play speed with mplayer. You can also use [] and {} keys to change play speed on-the-fly.
rips the audio and video stream of a movie. The two streams are stored separately.
This assumes that there is a 10.2 sec delay between the video and the audio (delayed). To extract the original video into a audio and video composites look at the command on extracting audio and video from a movie
Takes an mpeg video and coverts it to a youtube compatible flv file. The -r 25 sets the frame rate for PAL, for NTSC use 29.97
-vn removes tha video content, the copy option tells ffmpeg to use the same codec for generating the output
The quality ranges between 0 to 9, with the smaller number indicates a higher quality file but bigger too.
Using mplayer to extract audio file from a CD
It can be hard to spot differences in reformatted files, because of all the diff noise created by word wrapped lines. This command removes all the noise and performs a word-by-word diff. To ignore empty lines, add -B to the diff command. Also, if this is something you do often, you might want to check out the wdiff(1) program.
This command will let you just type c-a b (which means press 'ctrl' then 'a' then 'b'), and screen will save your copy buffer to /tmp/screen-exchange, and then execute xsel to copy the contents of that file into the system's X clipboard. 1. Install Conrad Parker's xsel from http://www.vergenet.net/~conrad/software/xsel/ 2. Add these lines to your .screenrc # Add cool line to make copying to x clipboard possible. # This binds C-a b to copy screen's copy buffer to the system clipboard. bind b eval writebuf 'exec /bin/sh -c "xsel -i -b < /tmp/screen-exchange"' 'exec /bin/sh -c "killall xsel"' 3. Restart screen. 4. Test it by typing c-a [ to enter copy mode. 5. Select some text using vi movement keys (h, j, k, l, etc...) and starting your selection by hitting the space bar, moving with vi movement keys, and then ending your selection with the space bar. 6. Type C-a b, and screen will use xsel to copy your screen copy buffer to the system's X clipboard buffer. 7. Then you can paste the screen copy buffer into any X program. Note: If you're using Mac OSX, you can use pbcopy instead of xsel. Also Note: The second exec in the .screenrc file, which runs killall on xsel, is necessary, because even when you redirect a file to xsel, xsel waits for you to press ctrl-c to kill it, and have it stop waiting for more input. Since xsel forces screen to wait, and I don't want to press ctrl-c, I send the equivalent of ctrl-c with killall causing xsel to write /tmp/screen-exchange to the X clipboard, and then exit. It's a hack, but it works. If you know how to get this to work without a lame hack leave a comment explaining how. Show Sample Output
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.
This is useful for use in scripts. Note that this will leak your password to ps, so this shouldn't be used on shared machines. Use key files for this
you have to replace "mustek_usb" with the scanner found by `scanimage -l`
Useful if you have to put some mp3 files into mobile devices (ie mobile phones with no much memory)
This is useful for command line 'recycle bins' and such like
commandlinefu.com is the place to record those command-line gems that you return to again and again. 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.
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.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
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: