I always remove files from my machine using sudo rm -rf file, and today I found that shred does a better job in terms of preventing files from being recovered later. My question is: I have an SSD only in my machine, and I'd like to know if removing files using shred instead of rm will decrease the lifespan of my SSD a lot, or since it's just a file it does not matter that much. Disclaimer:  I know that flash disks are not bullet-proof when using shred, I read in many places that it's impossible to guarantee 100% that the files will not be recoverable, but I'm not hiding files from gov etc, just want to delete them for good in case I sell my computer in the future.  I keep shred's default 3 overwrite passes.
124225
When trying to securely wipe SSDs, we have several problems:   SSDs wear out after a limited amount of erase cycles SSDs have a controller that dynamically maps LBAs (logical block addresses used by the system to access the disk) to NVRAM cells (the actual flash memory cells) to balance the wear, which means telling the disk to overwrite the blocks that formerly stored a specific file may result in overwriting any other spare blocks. SSDs have a notable percentage of reserve capacity that is used to compensate dying storage cells and reduce wearing. They are not visible to the system and might hold old data fragments.   Now what options do we have from inside Ubuntu to securely wipe SSDs?  I've heard that some newer SSDs should be able to securely wipe themselves, but how do I find out whether my SSD is capable of this and how would I trigger it? There should also be an ATA secure erase command, how do I find out if that is supported and how would I trigger that?    Are there also ways to securely wipe only a given file or only unused space? I guess making a backup of all partitions, securely wiping the entire disk and then restoring the backup would be possible but sounds too complicated and would take too long to be practical. Are there other alternatives? If not, what tools can I use to backup partitions without also backing up already deleted files?   Of course the standard tools like shred or wipe are not usable here for the points described above. They simply overwrite a a file (by overwriting its file system clusters which are bound to LBAs which are not constantly pointing on the same flash cells due to the wear levelling controller).
47383
I'm using Ubuntu 12.04, and when I rigth click on a my flash drive icon (in the Unity left bar) I get two options that have me confused: eject and safely remove.  The closer I came to an answer was , which concludes that (for a flash drive) they are both equal and also equivalent to use the umount command. However, this last assertion seems to be false.  If I use umount from the console to unmount my flash dive, and then I use the command lsblk, I still see my device (with nothing under MOUNTPOINT, of course). On the other hand, if I eject or safely remove my flash drive, lsblk does not list it anymore. So, my question is, what would be the console command/commands that would really reproduce the behaviour of eject and safely remove?
1552
We have an issue with a folder becoming unwieldy with hundreds of thousands of tiny files.  There are so many files that performing rm -rf returns an error and instead what we need to do is something like:  find /path/to/folder -name "filenamestart*" -type f -exec rm -f {} \;  This works but is very slow and constantly fails from running out of memory.  Is there a better way to do this? Ideally I would like to remove the entire directory without caring about the contents inside it.
74158
So, Im working in a UNIX environment and I noticed that inside my working directory, which is miles miles away from my UNIX home, there is a ~.  Now, once in the past, I did rm -rf ~ from my working directory and ended up erasing my home directory completely and had to involve IT.  I do not want to do it again. At the same time, I want to know   Why is ~ created in my working directory? Is it a faulty finger slip while saving (:w! but what happens is :w~ ?!!) Before checking in, there is a script that looks for extra files or folders that p4 is not aware so def this ~ might cause an issue. So how can I remove the ~ from my working directory and at the same time not erase my home?   I do have a backup command called del that I use instead of rm -rf. It just places stuff in a temporary location. I could use that and get rid of the ~. But I'm more interested in knowing why this happens, and how I can remove it?
10759
I'm looking for a quick, simple, and effective way to erase the hard drives of computers that my company will be getting rid of (donation to charity, most likely). Ideally, I would like a single-purpose bootable utility CD that upon booting, finds all attached hard drives and performs an "NSA grade" disk erasure.  Is anyone aware of such a utility (even one not quite as automated as what I've described)?
122120
What does the computer do when we format our hard disk or flash disk. If formatting clears all data on a disk, what is the difference between deleting all files in the disk and formatting the entire disk? Is it bad to format multiple times? How many times can a disk be formatted? Will formatting reduce the lifespan of my drive? What is the difference between quick formatting and standard formatting?
50698
I frequently connect different external USB hard drives and flash drives to my computer and I would like to facilitate deleting files and regaining disk space from them.  If I simply delete the file, it will be kept in a hidden trash folder on the external drive until I empty the Trash. This also forces me to empty my local trash simultaneously while the external disk is still connected to regain the disk space, which is undesirable.  At the moment, the only other "solution" I've found is moving the file to the internal hard drive and then trash it. This is not optimal because I waste time moving files from one drive to another (I regularly deal with 20GB+ VMs).  How can I permanently delete a file from an external drive, bypassing the trash?
75773
I opened up my flash drive this morning and all of my folders and files are normal, except for one folder and all its included files, which is the most important folder. The subfolders and files are renamed with bizarre characters and when I click to open them, a pop-up appears saying it's not accessible and the filename or directory name is incorrect. I don't want to reformat the flash drive because I'd lose all those files. Is there a way for me to restore it or something?  I would attach a screen shot, but apparently new users do not have that privilege. If you have a vague idea of what I'm talking about, let me know and I can email you screenshots so you can have a better understanding. Any help is greatly appreciated!
11496
I was just reading a question on backups with flash drives, but I was not quite sure why SSDs would be better than flash drives for backups.  To me, solid-state drives look like larger versions of flash drives. But surely there must be something that makes the former much more reliable than the latter.  What's the difference between an SSD and just a regular flash drive? For example, do they both use NAND?
61766
I recursively deleted the contents of my root directory with sudo privileges. My display reset, and windowing stopped working. I could no longer run non-buitin commands. Most of my directories (including the home directory disappeared).  What I meant to run:  sudo rm ./* -rf   What I believe I ran:  sudo rm /* -rf   I understand how this command works (see ).  I'm trying to get a better sense of how much (and what parts) of the original files and directory-structure physically remains on the hard-drive.  How much of these "remains" are recoverable? E.g is it possible to use data recovery software like TestDisk/PhotoRec to recover the full home dir itself? What about config files?
75562
In my job we are not guaranteed to keep using the same computer forever. Also, I need to keep the files at arm's reach when traveling. This is screaming a "cloud" solution, but here in Brazil mobile connectivity is still an issue, and relying on company networks there is always the firewall and network policy issue, so cloud is no-go.  So I started using a 16GB flash drive to store all my personal and work documents. But I am afraid someday the thumb drive will die on me and I will lose everything. Also I have a hard time when I forget it at home and can't access my files.  So I am looking for some utility/script that will run on my home and work computers and whenever I connect the thumb drive, it detects it as my thumb-drive and synchronizes with folders on the computer, kinda like rsync.   These are the needed features:   Securely recognizes the thumb-drive (using a special "key" file or volume serial numbers) Update only modified files (no dumb-copying, as it's several GB) If a file was modified on both on the thumb-drive and the computer, ask for which one to keep. I may choose which folders to sync (do not want to sync the music folder, for example) Non-annoying operation, just ask for a decision on conflicts if needed (but a progress indicator would be nice).   Desirable but not required, are syncing being done automatically before removal (instead of at insertion).  Is there a ready-made Windows tool for this job? This could be pulled out with a batch file but I wanna know if there is something on the market already.  Thanks!  Update for future viewers..  SyncToy is very good, but has the flaw of needing Administrator account for installation. I needed to sync with na old XP work computer, with limited permissions. I've settled for Unison  . It is a command-line app, but matches all my requirements, and does not need  to be installed.
101270
I had a Mid-2012 MacBook Pro that recently stopped booting. I narrowed this down based on troubleshooting of the boot device to likely the SATA/hard drive connector/cable no longer working for whatever reason.  I have decided to sell the system. I'd like to know if I remove the hard drive (or in this case, an after-market SSD I've installed) from the system, will there be any other data (i.e. iCloud data) stored on the system on any other chip that I can reset in any way? I plan to reset the SMC/NVRAM before I sell the system off of to someone else.  Additionally, if I remove the hard drive, is the system still associated to iCloud (specifically Find My Mac) or any other service? If so, how do I disassociate it? The system will no longer boot even if I put in my boot device.  Thanks!
14499
Recently I accidentally did rm on a set of files and it got me thinking where exactly these files end up?  That is to say, when working with a GUI, deleted files go to the Trash. What's the equivalent for rm and is there a way of undoing an rm command?
102272
I can't get my head around rm -rf / : after the kernel and /bin is deleted, how does rm maintain a run time stack, and communicate with the file system &amp; hardware till it completes deletion? Is rm statically linked with all needed binaries and load the whole file system directory tree into memory when the command initiates?
57156
I know that most files, when deleted, aren't actually removed from the disk, and can be recovered later.  How can I ensure that a directory I had deleted will actually be removed from the disk? Are there utilities for that?  I'm using Debian Linux.
103411
Some time ago I erroneously deleted my home folder because I ran a rm -rf * on the wrong terminal, whose working directory was the home folder!  I wish I had an alias for the rm command, but it was not the case.  Now, I am planning to make a script as an alias for rm.  Do you have any best practice to suggest?  Thanks.
27920
I have a folder with 266778 subfolders. How can I delete it?  I have tried  cd ~/.local/share/Trash/ sudo rm -rf *   but it takes much time. After 1 minute 25 seconds real time and 0.072 seconds user time it only deleted 2500 folders. This way, it will take over two hours to delete this folder.  Is there a faster way to delete this folder? Why is there such a big difference between user time and real time?  real    1m25.474s user    0m0.072s sys     0m28.142s   I use Linux 2.6.32 (Ubuntu 10.04.4 LTS).