Re: Finding the size of directory with multiply hardlinked files

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

 



Dean S. Messing wrote:
Say backup_A was created first.  If I do `du_true
backup_A' I shd. see its size.  Now I delete some files
in "/dir_to_back_up" and create some other new files.
Now I create "backup_B" with the above rsync command.  I'd
like for my mythical `du_true' to compute the
incremental change in size from backup_A to backup_B.

du -s -c backup_A backup_B

I use that to do exactly what you are want (hardlinked backups).

The first result is the space occupied by A, the second
result is the _additional_ space occupied by B.

You can also go beyond two dirs.

du -s -c backup_A backup_B backup_C backup_D

But I find this one more useful:

du -s -c backup_D backup_C backup_B backup_A

because the result

10G backup_D
600M backup_C
300M backup_B
400M backup_A

tells me that if I delete the oldest backup
I free 400M, and I can free 700M if I delete
the two oldest backups, etc.

You can play with something like:

du -s -c `ls | sort -r`

Best regards.
--
   Roberto Ragusa    mail at robertoragusa.it

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux