Sunday, July 7, 2013


Strip video from vob file
ffmpeg -i VTS_02_1.VOB -an -sn -vcodec copy -f rawvideo output.mpeg

Extract audio from video file
ffmpeg -i video.mp4 -vn -ac 2 -ar 44100 -ab 320k -f mp3 song.mp3

Cut vob file to certain length
ffmpeg -i VTS_02_1.VOB -vcodec copy -acodec copy -ss 00:01:00 -t 00:05:04 output.mpeg

Mux video and mp3 file together into a single container
ffmpeg -i output.mpeg -i grapes_-_I_dunno.mp3 -vcodec copy -acodec copy test.mp4

Posted by Posted by WL at 4:23 PM
Categories:

0 comments  

Monday, July 1, 2013


To see view properties like storage directory etc

clearcase lsview -properties -long view-tag

To check the cache information for a view
ct getcache -view view-tag

To set a new cache size for a view. The following command will set the cache size to 1MB.
ct setcache -view -cachesize 1024k view-tag

Posted by Posted by WL at 8:31 AM
Categories:

0 comments  

Thursday, June 6, 2013


In order to process many different log files at a single location, you could stream output from "tail -f" to a tcp port and process it that way. Here is how you could stream it

tail -f file.log > /dev/tcp/ip-address/port-num

Posted by Posted by WL at 9:49 AM
Categories:

0 comments  

Friday, October 12, 2012



du -s *

Posted by Posted by WL at 7:19 AM
Categories:

0 comments  

Sunday, July 10, 2011


Debian stopped including mkisofs in sid. Instead they have a program called xorrisofs. Here is how to use it to create iso images from a directory.

xorrisofs -r -J -o ./image.iso ./your_directory/

Posted by Posted by WL at 9:13 AM
Categories:

0 comments  

Sunday, February 20, 2011


iptables can block Internet access to application running as a specific group or user. So to enable application specific Internet blocks can be achieved this way:

Add a group which we can then add to the blocked list. I am adding here a group named 'nosoupforyou'

addgroup nosoupforyou

Set a password for this group
gpasswd nosoupforyou

Add iptables rule to enable blocking. This will drop all packets created by nosoupforyou
iptables -A OUTPUT -m owner --gid-owner nosoupforyou -j DROP


finally run a program as this new group
sg nosoupforyou /usr/bin/firefox

You will notice that if you start firefox this way, you can not access any sites at all. You can just start any other programs you would like to block from accessing Internet.

Posted by Posted by WL at 9:05 AM
Categories:

0 comments  

Tuesday, February 8, 2011


To explode/burst/split a pdf files into multiple files of single pages

pdftk file.pdf burst

To join multiple PDF files into a single PDF
pdftk *.pdf output single-file.pdf

Posted by Posted by WL at 9:23 PM
Categories:

0 comments  

 
>