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