Formatted USB reads 1% used

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
echo-dualis

Formatted USB reads 1% used

Post by echo-dualis »

On terminal. When I run:
sudo mkfs.vfat -n 'new-usb-name' -I /dev/sdb1

Code: Select all

mkfs.fat 4.1 (2017-01-24)
which means ok
I run:
sudo df

Code: Select all

Filesystem                1K-blocks     Used Available Use% Mounted on
udev                        8136672        0   8136672   0% /dev
tmpfs                       1633864     1644   1632220   1% /run
/dev/mapper/mint--vg-root 943182040 35804160 859397132   4% /
tmpfs                       8169312    13628   8155684   1% /dev/shm
tmpfs                          5120        4      5116   1% /run/lock
tmpfs                       8169312        0   8169312   0% /sys/fs/cgroup
/dev/sda1                    720368   154564    513412  24% /boot
tmpfs                       1633860       84   1633776   1% /run/user/1000
/home/echo/.Private       943182040 35804160 859397132   4% /home/echo
/dev/sdb1                  15241664        8  15241656   1% /media/echo/FLASHX
I want it wipe clean 0%. Please help!!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

Re: Formatted USB reads 1% used

Post by xenopeek »

8 KB out of 15241664 KB does not equal 1% use. Your df command is rounding up. Do the math; it's 0.000052488% or about a twenty thousandth of a percent.

As your filesystem is in range 8 GB to 16 GB it's cluster size is 8 KB. df shows you have one cluster in use. That's where my FAT32 knowledge stops as to explain or find out what that one cluster is. But for 0.000052488% I'm not really inclined to go dig for an answer.
Image
ralplpcr
Level 6
Level 6
Posts: 1097
Joined: Tue Jul 28, 2015 10:11 am

Re: Formatted USB reads 1% used

Post by ralplpcr »

The simplest way to put it is "overhead". A blank drive will contain the full amount of bytes as indicated by the specified size - usually rounded up to MB, GB, or TB using 1000 instead of the "real" 1024 units/MB, GB, or TB. But in order for operating systems to read or write to the drive, it must be partitioned & formatted. That way, the drive can easily determine where a "block" of data resides. It also contains a sort of "table of contents" to store the locations of where data resides for each particular file or program.

Think of it as a blank piece of paper vs graph paper. You can fill both with data, and assuming that you're extremely neat & organized, you can probably cram slightly more data onto the blank paper than onto the graph paper - - assuming that you keep the same size letters and limit your graph paper writing to 1 character/block. But when it comes to *finding* that data, having the lines & the table of contents makes a huge difference. It's much easier for an operating system to look at the table of contents, find that your requested file runs from column B5 through C15, and then do whatever action you've requested than to make it randomly search through the data with no demarcations between characters, programs, files, etc.

That's what partitioning & formatting is. There are standard block & segment sizes which are used by each file system type, and a means by which it is indexed. And although this does take up some space on your "blank" disk, the end result is much more efficient and organized than it would be if you tried to write on the drive in a raw format.
srq2625

Re: Formatted USB reads 1% used

Post by srq2625 »

echo-dualis wrote: Tue Sep 25, 2018 4:42 pm I want it wipe clean 0%. Please help!!
The only way to completely wipe it 100% clean is with a command similar to

Code: Select all

sudo dd if=/dev/zero of=/dev/sdX bs=1k count=2048 
where the /dev/sdX in the above is replaced with appropriate code addressing your USB device.

And, even then, the device will not be 100% clean. It will be filled with, I'm guessing, nothing but zeros (0).

Once a device has been written to one time, there is no way, using a computer, to re-fill that device with nothing. If you want to do that, there are devices that will "mass erase" a magnetic device (aka - spinning HDD or similar) but finding a device to do that for memory chips is a bit more problemtical.

If you want the device to useable - the above two responses cover the question quite well.
gm10

Re: Formatted USB reads 1% used

Post by gm10 »

Well, you should get to 0% used if you format the drive as FAT16. That one does not have the overhead that you're seeing - but other drawbacks because of that. ;)
echo-dualis

Re: Formatted USB reads 1% used

Post by echo-dualis »

Thank you all for taking the time to explain with such detail. Very helpful!
Locked

Return to “Beginner Questions”