dd if=/dev/random of=/dev/sda
Depending on how long does it run, you end up with a more or less screwed computer. It's funny to see how does the machine fall over when you invoke a simple 'cd' command after this. dd if=/dev/random of=/dev/sda
Depending on how long does it run, you end up with a more or less screwed computer. It's funny to see how does the machine fall over when you invoke a simple 'cd' command after this.(The server was part of a MogileFS cluster so there were multiple copies of the data online. There was no data loss, not even any downtime. Still, it was scary as hell, and I spent all Saturday in the data center restoring the box.)
$ foo < bar # runs command `foo`, reading from `bar` on stdin
$ foo > bar # runs command `foo`, writing stdout to `bar`
Writing `>` instead of `<` has resulted in many a blowup at 3 AM ssh remotehost.example.com mysqldump -udbuser proddatabase | mysql -uroot testdatabase
(n.b. the mysqldump options that may lock your production tables during the dump.) rm * -i
The system response was "-i not found" or something like that. rm bob*
has completely different behavior from rm bob *
The above line of code successfully fixed a bug I'd been trying to find for weeks in source code in the same directory. When I rewrote it from scratch, the bug was gone. rm /tmp/*
zsh: sure you want to delete all the files in /tmp [yn]?I avert the problem by having rm run interactively by default:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
http://aniggler.tumblr.com/post/44530262158/the-first-thing-... while :
do
clear > /dev/tty
sleep 5
done(for ref, we had to do very naughty things to SunOS 4 to add it to /etc/shells)
It picks a random device on your system -- ram, video, bios, etc -- and writes a random number of random bytes into it and then sleeps for a random amount of time.
Last one standing lives.
/dev/sda1 is the first partition on that drive, /dev/sda2 the second, and so on. /dev/sdb is the next hard drive, /dev/sdc the next after that; beyond /dev/sdz, the naming scheme is apparently dependent on the hardware driver in use: Going from /dev/sdz to /dev/sdaa is what happens in the default SATA and SCSI drives, up to /dev/sdzzz, at which point you apparently run into problems. [1]
http://rwmj.wordpress.com/2011/01/09/how-are-linux-drives-na...
[1] http://kerneltrap.org/mailarchive/linux-scsi/2010/9/20/68866...