Skip to main content
added 13 characters in body
Source Link
Stéphane Chazelas
  • 584.8k
  • 96
  • 1.1k
  • 1.7k

I want to calculate a directory size with all its subdirectories. But I had made some of the subdirectories to mount from a mount point. (using "mount -B"mount -B/--bind) when

when I use "du -hks"du -hks the returned size includes the mounted directories. Is there a way to eliminate their size from the result?

Edit: The Directories I calculate size are all in the same location. There is a Main directory with shared content for all other directories (This contains all the mount points) and Directories have some individual files. The goal is to calculate the individual files size.

I want to calculate a directory size with all its subdirectories. But I had made some of the subdirectories to mount from a mount point. (using "mount -B") when I use "du -hks" the returned size includes mounted directories. Is there a way to eliminate their size from the result?

Edit: The Directories I calculate size are all in the same location. There is a Main directory with shared content for all other directories (This contains all the mount points) and Directories have some individual files. The goal is to calculate the individual files size.

I want to calculate a directory size with all its subdirectories. But I had made some of the subdirectories to mount from a mount point. (using mount -B/--bind)

when I use du -hks the returned size includes the mounted directories. Is there a way to eliminate their size from the result?

Edit: The Directories I calculate size are all in the same location. There is a Main directory with shared content for all other directories (This contains all the mount points) and Directories have some individual files. The goal is to calculate the individual files size.

edited title
Link
Stéphane Chazelas
  • 584.8k
  • 96
  • 1.1k
  • 1.7k

Calculating directory size without mount subdirectories bind-mounted from the same device

added 282 characters in body
Source Link

I want to calculate a directory size with all its subdirectories. But I had made some of the subdirectories to mount from a mount point. (using "mount -B") when I use "du -hks" the returned size includes mounted directories. Is there a way to eliminate their size from the result?

Edit: The Directories I calculate size are all in the same location. There is a Main directory with shared content for all other directories (This contains all the mount points) and Directories have some individual files. The goal is to calculate the individual files size.

I want to calculate a directory size with all its subdirectories. But I had made some of the subdirectories to mount from a mount point. (using "mount -B") when I use "du -hks" the returned size includes mounted directories. Is there a way to eliminate their size from the result?

I want to calculate a directory size with all its subdirectories. But I had made some of the subdirectories to mount from a mount point. (using "mount -B") when I use "du -hks" the returned size includes mounted directories. Is there a way to eliminate their size from the result?

Edit: The Directories I calculate size are all in the same location. There is a Main directory with shared content for all other directories (This contains all the mount points) and Directories have some individual files. The goal is to calculate the individual files size.

Source Link
Loading