USEFUL LINUX COMMANDS (I KEEP FORGETTING) ***************************************** Formatting The Master Boot Record --------------------------------- $ dd if=/dev/zero of=/dev/hda count=1 bs=512 Formatting Flash Drives With An Ext3 Partition ---------------------------------------------- Start by running fdisk at the prompt, and delete any existing partition. Once the problem partitions are gone, use cfdisk to create a new partition table. (Or use fdisk---you crazy freak.) $ mkfs.ext3 -m 0 /path/to/device This will format the drive as ext3 and NOT reserve blocks for privileged users. Finally, you will want to run the following to disable forced file system checking every 'x' mounts: $ tune2fs -i 0 /path/to/device Killing A Hanging Process ------------------------- $ ps -A Or $ ps -u <user> $ kill <PID> Printing Random Lines From A File --------------------------------- $ shuf -n <number of desired lines to output> /path/to/file Backing Up DVD's ---------------- Backup the DVD: $ dvdbackup -i /dev/dvd -o ~ -M Create the iso: $ mkisofs -dvd-video -udf -o ~/dvd.iso ~/MOVIE_NAME Test the iso: $ xine dvd:/path/to/iso Burn the iso: $ growisofs -Z /dev/dvd=~/dvd.iso Downloading Streaming Media --------------------------- $ mplayer -dumpstream -dumpfile "foo.bar" "mms://path/to/media/foo.bar Or $ mplayer -dumpstream "foo.bar" -dumpfile "mms://path/to/media/foo.bar (Note: other potential protocols include mmst:// , http:// , ftp:// , rtp:// , rtsp:// , mpst:// , and sdp:// .) Combining *.vob Files --------------------- cat file-1.vob file-2.vob ... file-n.vob > file-new.vob