Check These Out
Using this command you can track a moment when usb device was attached.
Find files and calculate size with stat of result in shell
see the TIME_WAIT and ESTABLISHED nums of the network
Programs for locking and unlocking files and mailboxes.This package includes several programs to safely lock and unlock files and mailboxes from the command line. These include:
lockfile-create
lockfile-remove
lockfile-touchlock
mail-lock
mail-unlock
mail-touchlock
These programs use liblockfile to perform the file locking and unlocking, so they are guaranteed compatible with Debian's file locking policies.
This is useful if you have need to do port forwarding and your router doesn't assign static IPs, you can add it to a script in a cron job that checks if you IP as recently changed or with a trigger script.
This was tested on Mac OSX.
To rip DVD movie to ogg format using ffmpeg, follow these steps.
1) find the vob files on the mounted video DVD in VIDEO_TS that stores the movie itself. There would be a few other VOB files that stores splash screen or special features, the vob files for the movie itself can be identified by its superior size. You can verify these vob files by playing them directly with a player (e.g. mplayer)
2) concatenate all such vob files, pipe to ffmpeg
3) calculate the video size and crop size. The ogg video size must be multiple of 16 on both width and height, this is inherit limitation of theora codec. In my case I took 512x384.
The -vcodec parameter is necessary because ffmpeg doesn't support theora by itself. -acodec is necessary otherwise ffmpeg uses flac by default.
Replace 'csv_file.csv' with your filename.
This does the following:
1 - Search recursively for files whose names match REGEX_A
2 - From this list exclude files whose names match REGEX_B
3 - Open this as a group in textmate (in the sidebar)
And now you can use Command+Shift+F to use textmate own find and replace on this particular group of files.
For advanced regex in the first expression you can use -regextype posix-egrep like this:
mate - `find * -type f -regextype posix-egrep -regex 'REGEX_A' | grep -v -E 'REGEX_B'`
Warning: this is not ment to open files or folders with space os special characters in the filename. If anyone knows a solution to that, tell me so I can fix the line.
Press ^Z, do what you need to do on the shell, then input % to resurrect the suspended job.
replace "/usr/src/linux/kernel/signal.c" with any file you want and listen to its output ! :P
you can also replace "cat" with "echo" or anything you can come up with
have fun :-}