Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

Reformatting vs Deleting

If you are having a problem with getting any of your computer's hardware to work with MEPIS or you can't find the right driver, this is the forum to use. It's for newbies and regular users to post questions. Just make sure to post what hardware you are having problems with, in the subject and not just in the post's text area, please.
Message
Author
User avatar
BitJam
Forum Guide
Forum Guide
Posts: 2472
Joined: Sat Aug 22, 2009 11:36 pm

Re: Reformatting vs Deleting

#11 Post by BitJam » Wed Oct 15, 2014 2:45 pm

chrispop99 wrote:WRT the original question, if a stick only contains non-sensitive data there is nothing to be gained from formatting. It won't make the stick work any better than just deleting unwanted files, and may shorten its life.
I disagree. Formating involves many fewer writes so it should extend the life compared to deleting. Deleting takes much longer because it is doing many more writes.

User avatar
chrispop99
Forum Guide
Forum Guide
Posts: 2366
Joined: Tue Jan 27, 2009 3:07 pm

Re: Reformatting vs Deleting

#12 Post by chrispop99 » Wed Oct 15, 2014 4:39 pm

BitJam wrote: I disagree. Formating involves many fewer writes so it should extend the life compared to deleting. Deleting takes much longer because it is doing many more writes.
Surely that depends how many files were to be deleted, and whether the format was quick, or full?

Chris
Test machines:
32-bit non-PAE - Thinkpad T41, 1.6GHz Pentium M, 1GB RAM.
32-bit PAE - DELL Latitude D610, 1.73GHz Pentium M, 2GB RAM.
64-bit - Lenovo T61, 2GHz Core 2 Duo, 2GB RAM
64-bit - Gigabyte Z77P-D3, Intel i3-3220, GeForce 8400 GS, 4GB PC3-12800.

User avatar
BitJam
Forum Guide
Forum Guide
Posts: 2472
Joined: Sat Aug 22, 2009 11:36 pm

Re: Reformatting vs Deleting

#13 Post by BitJam » Wed Oct 15, 2014 6:34 pm

chrispop99 wrote:Surely that depends how many files were to be deleted, and whether the format was quick, or full?
Yes, of course. If there are no files then deleting all the files will take fewer writes than making a new file system. Likewise, if all the files are in a single directory then deleting is going to be faster and require fewer writes.

Generally it has been my experience that when the question comes up of whether to delete or mkfs, then mkfs is much faster by a factor or 10 or 100 or greater. In those cases where it is much faster, I think it causes less wear as well.

Unless you are going to spend days on end typing "mkfs ..." then you will not wear out a device by make new filesystems on it. You can easily put a hard upper limit on the amount of writes being done by the entire time the operation takes and the write bandwdith. Something that takes seconds or even a few minutes is not going to cause significant wear. Even if you do it every day.

User avatar
Gordon Cooper
Forum Guide
Forum Guide
Posts: 1991
Joined: Mon Nov 21, 2011 5:50 pm

Re: Reformatting vs Deleting

#14 Post by Gordon Cooper » Thu Oct 16, 2014 12:28 am

The overall thought of a magnetic device wearing out is interesting. With mechanical devices like recording tapes, and the mechanical
components of a disk drive, it is easy to pinpoint places of wear and eventual failure. When we have a solid state item, like a memory stick where changes are in the magnetic state of very small parts of that stick, what is it that wears out causing a failure?

User avatar
lucky9
Forum Veteran
Forum Veteran
Posts: 11380
Joined: Wed Jul 12, 2006 5:54 am

Re: Reformatting vs Deleting

#15 Post by lucky9 » Thu Oct 16, 2014 12:48 am

Transistors aren't magnetic.
Regarding SSD longevity only so many times will the transistor be able to be reprogrammed. See: http://en.wikipedia.org/wiki/Flash_memory
Yes, even I am dishonest. Not in many ways, but in some. Forty-one, I think it is.
--Mark Twain

User avatar
Gordon Cooper
Forum Guide
Forum Guide
Posts: 1991
Joined: Mon Nov 21, 2011 5:50 pm

Re: Reformatting vs Deleting

#16 Post by Gordon Cooper » Thu Oct 16, 2014 2:59 am

Thanks Lucky, I am a bit out of date. So we are dealing with electric charges rather than magnetic, but the principle is still the same,
what wears out?

User avatar
chrispop99
Forum Guide
Forum Guide
Posts: 2366
Joined: Tue Jan 27, 2009 3:07 pm

Re: Reformatting vs Deleting

#17 Post by chrispop99 » Thu Oct 16, 2014 4:25 am

Sorry, but I'm still struggling with the concept of formatting being faster.

I loaded a 16GB stick with many files in folders until the system complained it was full. I removed and re-inserted the stick; Thunar launched. I did Ctrl-A. Shift-Del, Enter. The files were all cleared within 5 seconds or so, faster than I could have located GParted on the menu, typed the Root password, waited for the disks to be identified, then treble-checked I had selected the correct one, let alone waited for the format process to complete.

With only 2GB on the stick, deletion was instantaneous as far as a human could tell.

WRT FAT corruption, I have been using USB sticks from a time when I had to give serious consideration as to whether I could justify buying a 128MB one on the grounds of cost. I have one 16GB stick that contains Windows installation files that has had so many insertions that the plastic has worn to the point where the stick is going to break any time soon. I have never seen FAT corruption.

(I have used sticks to install and run Linux on that I have been unable to format back to FAT afterwards. It has not been possible to recover them in Linux; this Windows software:

http://hddguru.com/software/HDD-LLF-Low ... rmat-Tool/

has saved the day in such circumstances.)

To the OP and others, my advice would still be to just delete unwanted files rather than format, if only because it removes the possibility of the wrong disk being formatted!

Chris
Test machines:
32-bit non-PAE - Thinkpad T41, 1.6GHz Pentium M, 1GB RAM.
32-bit PAE - DELL Latitude D610, 1.73GHz Pentium M, 2GB RAM.
64-bit - Lenovo T61, 2GHz Core 2 Duo, 2GB RAM
64-bit - Gigabyte Z77P-D3, Intel i3-3220, GeForce 8400 GS, 4GB PC3-12800.

User avatar
Jerry3904
Forum Veteran
Forum Veteran
Posts: 22420
Joined: Wed Jul 19, 2006 6:13 am

Re: Reformatting vs Deleting

#18 Post by Jerry3904 » Thu Oct 16, 2014 10:02 am

I did Ctrl-A. Shift-Del, Enter.
That's what I do, with the same quick results, so am having trouble following this conversation.
Production: 4.15.0-1-amd64, MX-17.1, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 8 GB, Kingston SSD 120 GB and WesternDigital 1TB
Testing: AAO 722: 4.15.0-1-386. MX-17.1, AMD C-60 APU, 4 GB

User avatar
joany
Forum Veteran
Forum Veteran
Posts: 5919
Joined: Mon Feb 12, 2007 1:45 pm

Re: Reformatting vs Deleting

#19 Post by joany » Thu Oct 16, 2014 2:56 pm

This has been an interesting discussion with many different viewpoints. I asked this question in the OP because of the following situation.

I have a BlueRay player with a USB port that enables me to play .mp4 video files from a flash drive on my TV set. Once in a while, a video skips ahead like it's fast forwarding and I then have to "stop" and "rewind" it. Maybe it's my imagination, but it seems that the videos don't skip as much if I reformat the flash drive before copying files onto it. When I just delete the old files and copy new ones, they seem to skip more often.

I know that deleting a file, its entry is removed from the file allocation table (FAT), whereas reformatting the drive removes the FAT entirely. I was just wondering what other differences there are between reformatting and simple file deletion. It's not the speed I'm worried about -- I can delete a whole bunch of files almost instantaneously, whereas reformatting takes a bit more time. But I was wondering if reformatting places the drive in a "cleaner" state.

BTW, has anyone else used a USB flash drive in a BlueRay player and noticed files skipping?
MX-14; 3.12-0.bpo.1-686-pae kernel using 4GB RAM
2.4GHz AMD Athlon 4600+
NVidia GeForce 6150 LE; 304.121 Display Driver
You didn't slow down because you're old; you're old because you slowed down.

User avatar
lucky9
Forum Veteran
Forum Veteran
Posts: 11380
Joined: Wed Jul 12, 2006 5:54 am

Re: Reformatting vs Deleting

#20 Post by lucky9 » Thu Oct 16, 2014 3:34 pm

Gordon Cooper wrote:Thanks Lucky, I am a bit out of date. So we are dealing with electric charges rather than magnetic, but the principle is still the same,
what wears out?
I'm not up on the physics of Flash Memory, but they only have a lifetime of so many uses. I read that for most home Users this translates to several thousand to about a million uses (or switches if you prefer) depending on the actual type of Flash Memory construction that is used. Remember this memory is electrically erased and then reused. Some endurance is dependent on Firmware and also the size of the unit (128 GB gives less use than 512 GB).
See: http://en.wikipedia.org/wiki/Flash_memo ... _endurance
for normal endurance of the different types.

On the Format or Delete question I've always used Delete. Only time I format is when there's a problem with the drive. Once I used a zero-write wipe to clear some interfering (Windows-based) software on the drive.
Yes, even I am dishonest. Not in many ways, but in some. Forty-one, I think it is.
--Mark Twain

Post Reply

Return to “Hardware General”