My intent:
i wanted to fill my external HDD (1TB) with zeros so i used:
dd if=/dev/zero | pv -t -e -r -a -b -s 930000000000 | dd of=/media/usb/clearAll ; rm /media/usb/clearAll ; shutdown -P 00
Explaining the command above:
After completely filling the HDD with zero I wanted to delete that file and after deleting that file i wanted to shutdown my laptop due the fact that it will take several hours and I need to sleep as well. Yeah i know, i did forget to unmount the external HDD before shutting down.
pv is just to monitor to progress of the file transfers.
The problem:
Everything worked fine for 2minutes then ubuntu was shutting down normally! After 2 minutes? Where just about 6-7GB where occupied.
So i did start my laptop again to take a closer look at the syslog getting following:
Mar 15 20:04:18 Mikes-Laptop kernel: [27033.291030] init: tty4 main process (1006) killed by TERM signal
Mar 15 20:04:18 Mikes-Laptop kernel: [27033.291240] init: tty5 main process (1010) killed by TERM signal
Mar 15 20:04:18 Mikes-Laptop kernel: [27033.291383] init: tty2 main process (1016) killed by TERM signal
Mar 15 20:04:18 Mikes-Laptop kernel: [27033.291525] init: tty3 main process (1017) killed by TERM signal
Mar 15 20:04:18 Mikes-Laptop kernel: [27033.291672] init: tty6 main process (1020) killed by TERM signal
Mar 15 20:04:18 Mikes-Laptop kernel: [27033.313817] init: irqbalance main process (1081) killed by TERM signal
Mar 15 20:04:18 Mikes-Laptop kernel: [27033.313957] init: cron main process (1083) killed by TERM signal
Mar 15 20:04:18 Mikes-Laptop kernel: [27033.314282] init: tty1 main process (1195) killed by TERM signal
Mar 15 20:04:18 Mikes-Laptop rsyslogd: [origin software="rsyslogd" swVersion="7.4.4" x-pid="747" x-info="http://www.rsyslog.com"] exiting on signal 15.
and also
Mar 15 20:06:36 Mikes-Laptop kernel: [ 11.319099] EXT4-fs (sda5): re-mounted. Opts: errors=remount-ro
but i'm not sure if it is corresponding to the unexpected shutdown.
The question:
So can someone tell me what i did wrong? I thought every command after ; will be execute after the preceding one has finished.
Specs:
Ubuntu 14.04 LTS Seagate 1TB external HDD MSDOS FAT32 one Partition occupying the whole drive