![]() POSIX requires du to separate the number and the pathname with one space character.To find all directories for which du returns a number great enough, you can build a custom test in find that will actually run du and parse its output: find. The size of the file space allocated to a file of type directory shall be defined as the sum total of space allocated to all files in the file hierarchy rooted in the directory plus the space allocated to the directory itself. On the other hand du is deliberately designed to sum space allocated to all files in the directory: It does work, only the size tested with -size is not what you want. It's not that find command does not work with -type d and -size option together. ![]() If you run stat on a directory then you will see the size I'm talking about. ![]() ![]() It makes even more sense when you are able to read a directory like a regular file, but nowadays it's not that common. A directory is also a file, it has its own size which is not the total size of files within. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |