Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

13
  • I noticed that you have to be root for those commands to work. Is that always the case for sparse files? Commented Dec 13, 2015 at 3:06
  • No.Sorry. They should work as normal user as well, given proper write permission on the main folder. Commented Dec 13, 2015 at 8:38
  • Thanks for this great answer. Leaves me with a question and a worry. Worry: Pretending to have successfully written that second 2GB file when there was really no space for it? Troublesome... What happens when you try to read it back (with sha1sum or something)? Question: Are there ways to back up a sparse file across the network that keeps it sparse (i.e. only actually copies the parts that are used)? Commented Dec 13, 2015 at 11:47
  • 2
    I suspect the reason why you did not run out of space when creating the last file, is that you created a sparse file in the sparse file-filesystem,... so to say. Commented Oct 30, 2021 at 13:26
  • 1
    @DamianoVerzulli I asked this specific question, and got a good answer: unix.stackexchange.com/a/781639/149203 Commented Aug 15, 2024 at 12:02