Re: sub for dump/restore?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2025-05-09 at 23:20 -0700, ToddAndMargo via users wrote:
> On 5/9/25 9:06 PM, Dave Close wrote:
> > Francis.Montagnac@xxxxxxxx wrote:
> > 
> > > No: du rounds up:
> > > 
> > >     echo > one
> > >     du -m one
> > >     1       one
> > 
> > That is correct, not rounded. 'echo' creates a file with one byte,
> > a newline (0x0a).
> 
> 
> Actually, it creates a file that is allocated 4096 bytes.
> 
> $ echo > one
> 
> $ du -m one
> 1	one
> 
> $ du --block-size=1 one
> 4096	one
> 

No, the file is allocated 1 byte. The disk usage depends on the
filesystem. IIRC some filesystems could - at least historically - use
spare space in the inode for small files. That's why the output of 'du'
is usually different from that of 'ls -s'. It's the difference between
the *file size* and the *disk usage* (the clue is in the name).

> I believe it is called a "cluster", but I may be wrong
> on the name.

A cluster is usually regarded as a group of basic allocatable units
(i.e. blocks or pages), so this would not be a cluster except in the
degenerate sense, i.e. a cluster of 1.

poc
-- 
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux