I'm using Ubuntu 20.04.4 LTS. Why do I have a file in /home/myname/ called fdimage that is 805,8 GB? My SSD is a 500 GB one, and the partition allocated on it is only 125 GB... Clearly something is corrupted. What is going on here? Can I get rid of it?
The output of this command, however, tells a different story. According to du, this fdimage file only has a size of around 54.34 GB... How can Ubuntu give two different sizes for the same file?
du -a | sort -n -r | head -n 20
85129301 .
54340504 ./fdimage
12699488 ./DesktopAgain, the command stat /home/myname/fdimage returns a different size (805800542208 bytes = 805,8 GB) I'm fairly new to Ubuntu, and I couldn't find much information to this ./fdimage file, but from what I've read, I understood that maybe it's a kind of backup that Ubuntu automatically makes. Can I turn this off? I have my own backups, and I don't want Ubuntu eating more that half of my disk space.
In my last post I explained that, while I was using GNU ddrescue, my main drive completely filled up. I had to enter Ubuntu rescue mode to manually delete some files to have access again to the system. Is this related to the fdimage being this big? I had a file called mapfile in /home/myname but it was 0 kB in size. The drive on which I wanted to create a copy is still empty (0 bytes). Maybe I filled up my main drive instead of the external one with the blocks from the bad disk I was trying to rescue? Maybe I used the wrong ddrescue command? I cant't wrap my head around this, given that I could not find any files related to ddimage (apart from the above-mentioned mapfile that was empty) on my SSD.
Thanks in advance for your help.
1 Answer
Your fdimage is likely a sparse file, which would explain the wildly different file size. You can confirm this with the following command:
ls -lsh fdimage This will show the occupied size in the first column. If the occupied size is smaller than the apparent size then the file is sparse.
The file may have been created if multiple ddrescue commands had been tried, as the name appears in examples from the Gnu documentation. You can certainly delete the file so long as nothing is currently using it and you do not need any of the data contained within.