Questions tagged [sparsefile]
31 questions
                    
                    22
                    
            votes
                
                1 answer
            
        Why didn't `dd conv=sparse` save space as I expected?
I was going to make an image of my old USB drive. I had good reasons to expect there were some blocks filled with zeros on the device, so to save some space I used conv=sparse option:
dd if=/dev/sdb of=myusb.img conv=sparse bs=32M
However it saved…
        
        Kamil Maciorowski
        
- 81,893
 
                    12
                    
            votes
                
                1 answer
            
        How can I remove holes in a sparse file on Linux?
How do I remove all holes in a sparse file on Linux? On Windows, I believe the procedure is
fsutil sparse setflag  0
What is the Linux equivalent?
(I know cp --sparse=never  .cp; rm ; mv .cp ; would get the job…      
        
        hanshenrik
        
- 1,925
 - 3
 - 25
 - 38
 
                    9
                    
            votes
                
                4 answers
            
        copy|move sparse files on NTFS with Windows
How can I copy or move a sparse file from one NTFS volume to another NTFS volume while maintaining the sparseness using the native tools included with Windows?  If there is no way to do this with the native tools, then what is a free application…
        
        Michael Yasumoto
        
- 611
 
                    7
                    
            votes
                
                0 answers
            
        Determining status of cloned file on APFS
Apple is now using APFS across several product lines, including macOS.  This new filesystem has some nice features for minimizing how much actual disk space is consumed, such as sparse file support and COW clones similar to BSD's clonefile().
I've…
        
        petiepooo
        
- 338
 
                    4
                    
            votes
                
                1 answer
            
        Huge Docker file and `tar` behavior
When I did a backup on my Linux system with tar -czv, I noticed that the process is stuck very long at /var/lib/docker/devicemapper/devicemapper/data (way longer than a copy of all my images and containers should take), while the result file does…
        
        Milleu
        
- 43
 - 3
 
                    3
                    
            votes
                
                2 answers
            
        Why can't I create sparse files on my NTFS partition under Linux?
I have a very large sparse file on an EXT4 partition, and I want to copy that file to an NTFS partition. The file has a size of about 2 TB, but since it is a sparse file it uses only 700 GB on disk.
The NTFS partition where I want to copy that file…
        
        oliver
        
- 520
 - 1
 - 4
 - 17
 
                    3
                    
            votes
                
                1 answer
            
        How to compare huge sparse files efficiently?
There are two sparse files. They are proved identical by diff. But it took 20 minutes (too long time) to compare. I am thinking of taring them into tiny files to speed up the comparison. But they tar into different outputs.
They are 512GB huge…
        
        midnite
        
- 601
 
                    2
                    
            votes
                
                4 answers
            
        How To Format A Disk Image To Be Recognized By MS-DOS?
I'm trying to emulate windows with bochs on my android device. I've got the following drives: an empty disk image to install windows on, a virtual vvfat drive with the setup files, and a cdrom drive with the latest version of DOS. Bochs recognizes…
        
        Jaïr Paalman
        
- 243
 
                    2
                    
            votes
                
                1 answer
            
        Change sparse attribute from an .iso file on Windows 8.1
I have few very large .iso files in my computer altogether about 1TB. All of them are sparse files and i want to remove the sparse flag/attribute from them, is there a way how to do it? Maybe some application or so?
I know when i copy the file the…
        
        Ricsie
        
- 123
 - 1
 - 4
 
                    2
                    
            votes
                
                1 answer
            
        Is there a tool like `dd` but respect sparse-ness of input file?
I am creating disk images with multiple ext4 partitions on it. Each ext4 partition content is created with mkfs.ext4 and the resulting filesystem image files are "sparse".
When I use dd to create a system image (with a partition table in the…
        
        josch
        
- 988
 
                    2
                    
            votes
                
                0 answers
            
        Is there a Windows equivalent to fallocate --punch-holes?
I'm looking for a way to punch holes in files on Windows such that the actual size-on-disk goes down, and the area that is punched gets deleted. Identical to the behavior of fallocate --punch-holes on Linux.
Does that exist? I know sparse files…
        
        Daffy
        
- 309
 
                    2
                    
            votes
                
                1 answer
            
        How to re-sync already transfered sparse file with rsync?
I have completely transferred a file using rsync without the use of the --sparse, -S option. I don't want to waste space and thus re-sync the file and turn it into a sparse file. Is there a way to achieve this without deleting the file on the target…
        
        Jotschi
        
- 141
 
                    1
                    
            vote
                
                2 answers
            
        How To Make A Sparse File On Android With Terminal
I'm trying to make a sparse file on android. For this I'm using Android Terminal Emulator. I have installed Busybox so I can use the dd command. Other commands like truncate aren't installed. My question: does anyone know how to make a sparse file…
        
        Jaïr Paalman
        
- 243
 
                    1
                    
            vote
                
                1 answer
            
        How can a CSV file be sparse on Linux (or take up less space than it occupies)?
I copied a big folder of CSVs from Windows to Linux using scp.  Once the copy completed, I used du -sh . to make sure everything copied, and I see a much smaller disk usage than expected.  I can see that many of the CSV files are taking up much less…
        
        Eddie
        
- 237
 
                    1
                    
            vote
                
                1 answer
            
        dphys-swapfile on btrfs volume fails
I have used dphys-swapfile with the default path of /var/swap and a 2048M swap file.
However, since /var/swap is on a SD card, I wanted to move the swap file to a magnetic disk. So I ran sudo dphys-swapfile swapoff, edited the path, then ran:
sudo…
        
        user149408
        
- 1,142