Commands by dexterp (1)

  • This will also print the path to file which is not included in the other examples. Show Sample Output


    0
    cvs -Q status | perl -ne 'print if m/^File.+Status: (?!Up-to-date)/ .. m/^=/;'
    dexterp · 2011-12-07 00:33:49 0

What's this?

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.

Share Your Commands


Check These Out

Use mplayer to save video streams to a file
I use this command to save RTSP video streams over night from one of our national TV stations, so I won't have to squeeze the data through my slow internet connection when I want to watch it the next day. For ease of use, you might want to put this in a file: #!/bin/bash FILE="`basename \"$1\"`" mplayer -dumpstream -dumpfile "$FILE" -playlist "$1"

Sum size of files returned from FIND

Commands on svn stat

Encode a file to MPEG4 format
Encode video.avi into newvideo.avi using the libav codec to produce an MPEG4 file with a bitrate of 800

converts a directory full of source tarballs into a bzr repository so you can compare different versions easily

grep for tabs without using Ctrl-V trick
-P tells grep to use perl regex matches (only works on the GNU grep as far as I know.)

Show (only) list of files changed by commit
Lists ONLY the files changed by the given HASH/HEAD/list of hashes, etc. The message, commit ID, author, etc. is not included

cat ~/.ssh/id_rsa.pub | ssh user@site.com "cat - >> ~/.ssh/authorized_keys"
You'll want to use this for passwordless logins. Same as ssh-copy-id, if you don't have it on your system.

output your microphone to a remote computer's speaker

find out which directories in /home have the most files currently open


Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: