How do you REALLY delete images from a flash drive (such as for a digital camera)
I have a 2gb flash drive, and when I open it in Nautilus (on OpenSUSE) and delete the contents (images/videos from my camera), they disappear however they are actually just hidden. The free space doesn't change at all.
Instead it creates a new folder called .Trash-1000 and moves my photos/videos into that folder. If I delete it from there it still doesn't actually delete them either. F-spot only works for the images, not the videos. Basically I want to be able to mount my flash drive, and delete its content and stick it back in my camera and then have 2gb of free space again. I do not know whether this is a Nautilus problem, an OpenSUSE problem, or a Linux problem, but some developers somewhere are mentally retarded. What is the logic behind the stupidity? Solutions, please... |
Wow, that's kind of insulting, both to the Linux developers and to the mentally handicapped. :(
Anyway, Nautilus has an "empty trash" feature that, you guessed it, empties the trash. You can also go to Preferences->Behavior and enable the "Include a Delete command that bypasses trash" option. |
The logic behind that is quite simple. To enable the user to undo a deletion long time ago filemanager developers came up with the idea of a trashcan. So if you use a filemanager to delete files they only get moved to the trashcan. Just empty the trashcan and your files will get deleted permanently. This idea of those "mentally retarded" developers have literally saved an uncountable amount of people from doing their work twice.
The alternative from just emptying the trashcan would be to either tell your filemanager to permanently delete those files (most filemanagers have such an option) or to just delete the files using the commandline, which does not use the trashcan. |
Quote:
Quote:
It creates a hidden file entitled .Trash-1000 where it attempts to hide most of the files but it also seems to be hiding files elsewhere (i know this by looking at the free space which remains 600 MB short of 2 GB, since I managed to delete the contents of the .Trash-1000 folder not by deleting them from the .Trash-1000 folder (since it will only hide them again) but by deleting the folder itself.) The file > empty trash option does not delete the files from the drive (it deletes files from the trash, the normal trash on the desktop). It does not remove files from the .Trash-1000 folder or anywhere else on the flash drive. To remove files from that folder I had to delete the folder itself, but that still doesn't delete all the files. Doing so gave me back 1.4 GB however it is still hiding 600 MB worth of files somewhere on my 2gb flash drive and I cannot locate where it is hiding them so there is another place where it is hiding files also. Whether this 600MB worth of files remaining is due to having deleted the entire .Trash-1000 folder, i do not know, but i doubt it since it makes no sense that it would delete some but not all of the files contained in it. There is probably another place where it is also hiding files from me or else for some reason some of the files remain but are now inaccessible since nothing points to that place on the drive (even by recreating the folder). Nothing reveals itself through "show hidden files". To reiterate, this is not a matter of deleted files being moved to the trash as is the case when you normally delete something. This is a matter of files being intentionally preserved and deliberately hidden from me somewhere on the device. Mac OS X is known for pulling this shit too (since I had this problem long ago and resolved it through OS X forums found on Google which I can no longer find since Google panda crapped on the internet), Im guessing the developers responsible were trying to copy. New problem: I need to get the other 600MB back, but I cannot locate any files on the device (including hidden files). |
When emptying the trash does not delete the files in the hidden directory .Trash-1000 there seems to be a bug and it would be nice if you would report it to the Nautilus developers.
To get your space back simply format the drive, this should leave no traces of unreachable files. You can use GParted or other GUI tools or just mkfs from the commandline for that. |
Hey Quon,
I'm not an expert on Linux, nor am I one on cameras, but I do own a digital camera and do import pictures into my system now and again. A simple solution would be for you to click the "Delete files from device after importing" or some such option while importing. I've not used F-spot in a long time so I'm not sure, but shotwell has this option and it works very well for me. And I've managed to fill and refill my 4 GB's worth of space umpteen times without doing anything else. But then again, maybe the developers have a personal grudge against you and are doing something just to irritate the crap out of you. ;) |
The utility du will show where disk space is being used. The rm command will allow you to delete unwanted files. The mkfs command will allow you to format the partition(s) to recover all available space and effectively remove all content. Consult your local man page for the details on each command.
Your insulting language does not endear you to those from whom you seek assistance. --- rod. |
And for the future: Nautilus, Thunar and most file managers under many operating systems, you hold down Shift when you press the Delete key and it bypasses the Trash Can, Recycle Bin, or whatever you want to call it. Those files will be gone.
|
To do a secure Delete is the use this command:
Code:
dd if=/dev/zero of=/dev/<What ever device it's mounted as> bs=512 count=1 But after using the dd command, go ahead and use what ever disk partitioning tool you prefer to create a partition. Next run 'partprobe' command so that the system can update the '/etc/fstab'. Next after committing(Writing) your new partition, you want to use the 'mkfs' utility to create the file system of what ever the file format you desire to use. like: Code:
mkfs.ext4 /dev/sdb1 Code:
mount /dev/sdb1 /home/some_user23/pictures/photostuff Code:
mount I hope this helps you out alot. ~ Thanks. |
Quote:
|
I don't think the OP is concerned about obscuring anything, just making the full capacity of his media available. Re-writing the partition table will do that, if followed by creating a new filesystem on the media.
I don't know what partprobe does, but I would hope it doesn't add anything to fstab that would try to mount the flash media at boot time. Most people use flash media as removable, and it should probably only be mounted when inserted into a reader. I also wouldn't recommend an ext4 filesystem type on media that a camera is supposed to read/write. All the cameras I've used (small sample size) need a FAT filesystem on the flash media they use. --- rod. |
Quote:
Quote:
Being the OP was using the card in some other device (camera), ext4 cannot be used as well. Besides Android phones (and as I own none, I can not speak for it's removable media, only the built in memory), there are very few consumer electronics out there that support anything other than FAT (more specifically FAT32/VFAT). As far as the condescending attitude toward developers... Windows now has a frowning smiley when it gives a BSoD, so maybe such persons would be happier with such an OS with useless cute stuff. Like I said earlier, based on the OPs original request, Shift + Delete in Nautilus is all he needed. |
All times are GMT -5. The time now is 05:11 AM. |