### Commands by keturn (3) the last day the last week the last month all time sorted by date votes

• Takes all the .3gp files in the directory, rotates them by 90 degrees, and saves them in the lossless ffv1 encoding. If this rotates in the wrong direction, you may want transponse=1 Re-encoding to ffv1 may result in a significant increase in file size, as it is a lossless format. Other applications may not recognize ffv1 if they don't use ffmpeg code. "huffyuv" might be another option for lossless saving of your transformations. The audio may be re-encoded as well, if the encoding used by your 3gp file doesn't work in a avi container.

5
mkdir rotated; for v in *.3gp; do ffmpeg -i $v -vf transpose=2 -vcodec ffv1 rotated/${v/3gp/avi} ; done
· 2012-02-04 18:20:04
• Restores the keyboard so your partner who expects the keys to correspond to what they're labelled can type (in qwerty).

-2
setxkbmap us
· 2010-01-23 04:08:46
• What to type to fix the keyboard when it's all qwerty and/or the modifier key to the left of the 'a' is doing something unexpected. In addition, I've also been known to use the altwin:meta_win and compose:ralt flags.

0
setxkbmap dvorak '' ctrl:nocaps
· 2010-01-23 04:04:59

### 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.

### Check These Out

Edit a file in vim (at the first error) if it is not well formed xml.
Validate a file using xmllint. If there are parser errors, edit the file in vim at the line of the first error.

make a log of a terminal session
Creates a log of a session in a file called typescript. Or specify the file with: $script filename Exit the session with control-d. Get your Firefox history This is the way to get access to your Firefox history... multiline data block parse and CSV data extraction with perl extract data in multiline blocks of data with perl pattern matching loop escape any command aliases e.g. if rm is aliased for 'rm -i', you can escape the alias by prepending a backslash: rm [file] # WILL prompt for confirmation per the alias \rm [file] # will NOT prompt for confirmation per the default behavior of the command Convert JSON to YAML You need to install the Catmandu Perl module via cpanm Catmandu FizzBuzz one-liner in Python A common programming question for interviewers to ask potential job candidates is to code "FizzBuzz". That is, if a number is divisible by 3, then it should display "Fizz". If a number is divisible by 5, it should display "Buzz". If it is divisible by both, then it should display "FizzBuzz". Otherwise, display the current number between 1 and 100. List all execs in$PATH, usefull for grepping the resulting list
##Dependancies: bash coreutils Many executables in $PATH have the keyword somewhere other than the beginning in their file names. The command is useful for exploring the executables in$PATH like this. $find${PATH//:/ } -executable -type f -printf "%f\n" |grep admin lpadmin time-admin network-admin svnadmin users-admin django-admin shares-admin services-admin

Copy a file using dd and watch its progress
This is a more accurate way to watch the progress of a dd process. The $DDPID=$! is needed so that you don't get the PID of the sleep. The sleep 1 is needed because in my testing at least, if you run kill -USR1 against dd too quickly, it will kill it off instead of display the status. So you need to wait a second, probably so that it can configure itself to trap the USR1 signal.

convert MTS video file format into xvid/mp3 avi format