Re: Deletion of files from usb-key
Haines Brown wrote:
$ df /media/usb-key
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdd1 499440 303916 195524 61% /media/usb-key
Above you're using /dev/sdd1
# dosfsck /dev/sdd
Here you're using /dev/sdd (not the partition 1).
# mkdosfs -I /dev/sdd
Dito.
For making really sure you get to a clean state, I'd use this sequence
(not tested as typed, but should work; unlike the previous suggestion of
writing one sector with dd, this wipes the whole stick, so really make
sure that this is ok for you and that /dev/sdd *is* your stick):
Plug stick in, but do not mount it (or umount it again if it has been
automounted).
# cat /dev/zero > /dev/sdd
(it will probably print an error when it reaches the end of the device,
that's ok)
# sync
unplug, plug back in.
use cfdisk (or fdisk) to create one partition as has been there before.
unplug, plug back in (at least do this if cfdisk warns you about not
having been able to make kernel aware of the changed partition table).
# mkdosfs /dev/sdd1
(note the missing -I, since you're not working on a whole device
anymore, but on a partition (the only one))
Then mount the stick as usual.
Christian.
Reply to: