How can I calculate the size of a directory?












169















How to know the size of a directory? Including subdirectories and files.










share|improve this question





























    169















    How to know the size of a directory? Including subdirectories and files.










    share|improve this question



























      169












      169








      169


      36






      How to know the size of a directory? Including subdirectories and files.










      share|improve this question
















      How to know the size of a directory? Including subdirectories and files.







      directory






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 2 '11 at 18:14









      daviesgeek

      1351313




      1351313










      asked Oct 12 '10 at 12:31









      Juanjo ContiJuanjo Conti

      975276




      975276






















          9 Answers
          9






          active

          oldest

          votes


















          213














          du -s directory_name


          Or to get human readable output:



          du -sh directory_name


          The -s option means that it won't list the size for each subdirectory, only the total size.






          share|improve this answer





















          • 7





            Actually du's default unit is 512-byte blocks according to POSIX, and kilobytes on Linux (unless the environment variable POSIXLY_CORRECT is set) or with du -k.

            – Gilles
            Oct 12 '10 at 17:49






          • 3





            @Gilles: Good catch. I've removed the "number of bytes" bit from my answer.

            – sepp2k
            Oct 12 '10 at 17:53






          • 1





            worked as prescribed

            – skidadon
            May 28 '15 at 19:17






          • 1





            if the directory is very big and have lots of subdirectories, it takes lots of time... almost 1 min.. is that normal? is there a way to get the size more rapidly?

            – yeahman
            Oct 15 '15 at 19:59






          • 2





            I needed to calculate the size of my folder "bag", du -sh bag worked perfectly!

            – Toni Almeida
            Mar 4 '16 at 12:15



















          7














          GNU du takes a -b option.



          See the man page and the info page for more help:




          -b, --bytes is equivalent to --apparent-size --block-size=1







          share|improve this answer

































            6














            While using a separate package such as ncdu may work well, the same comparison of many folders can be done, to some degree, by just giving du a list of folders to size up. For example to compare top-level directories on your system...



            cd /    
            sudo du -sh ./*





            share|improve this answer



















            • 2





              More simply, du -sh /*

              – roaima
              Sep 10 '15 at 17:00



















            0














            you can also use ls -ldh:



            ls -ldh /etc
            drwxr-xr-x 145 root root 12K 2012-06-02 11:44 /etc



            -l is for long listing ; -d is for displaying dir info, not the content of the dir, -h is for displaying size in huma readable format.






            share|improve this answer



















            • 4





              This isn't correct, the person asking is clearly looking for footprint of a directory and it's contents on disk. @sepp2k's answer is correct.

              – blong
              Jun 5 '12 at 13:16













            • The ls -ldh command only shows the size of inode structure of a directory. The metric is a reflection of size of the index table of file names, but not the actual size of the file content within the directory.

              – linbianxiaocao
              Mar 28 '16 at 18:19



















            0














            du -csh


            -c produces grand total






            share|improve this answer


























            • The -c doesn't make sense to use together with -s, right? -s only displays the size of the specified directory, that is the total size of the directory.

              – Andreas Storvik Strauman
              Jun 5 '18 at 10:43



















            0














            Try



            du -hax --max-depth=1 / | grep '[0-9]G' | sort -nr


            This helps find large directories to then sift through using du -sh ./*






            share|improve this answer

































              0














              I always install the "ncdu" package and see all the output of all directories with graphical representation.
              This is because I usually need to know what's taking up the most disk space on my machines, regardless of how much a single directory sums up.



              Usage: sudo ncdu / (You do not need sudo for folders on which you have read permission).



              It will take a while to scan disk usage statistics on the whole file system. It has a nice command line graphical representation and included keyboard navigation using the arrow keys, like going deeper or higher in the scanned path. You can also delete items by pressing D.






              share|improve this answer

































                0














                You can use "file-size.sh" from the awk Velour library:



                ls -ARgo "$@" | awk '{q += $3} END {print q}'





                share|improve this answer

































                  0














                  du -hd1



                  will list in human-readable format the sizes of all the directories, e.g.



                  656K    ./rubberband
                  2.2M ./lame
                  652K ./pkg-config





                  share|improve this answer








                  New contributor




                  Boris Yakubchik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





















                    Your Answer








                    StackExchange.ready(function() {
                    var channelOptions = {
                    tags: "".split(" "),
                    id: "106"
                    };
                    initTagRenderer("".split(" "), "".split(" "), channelOptions);

                    StackExchange.using("externalEditor", function() {
                    // Have to fire editor after snippets, if snippets enabled
                    if (StackExchange.settings.snippets.snippetsEnabled) {
                    StackExchange.using("snippets", function() {
                    createEditor();
                    });
                    }
                    else {
                    createEditor();
                    }
                    });

                    function createEditor() {
                    StackExchange.prepareEditor({
                    heartbeatType: 'answer',
                    autoActivateHeartbeat: false,
                    convertImagesToLinks: false,
                    noModals: true,
                    showLowRepImageUploadWarning: true,
                    reputationToPostImages: null,
                    bindNavPrevention: true,
                    postfix: "",
                    imageUploader: {
                    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                    allowUrls: true
                    },
                    onDemand: true,
                    discardSelector: ".discard-answer"
                    ,immediatelyShowMarkdownHelp:true
                    });


                    }
                    });














                    draft saved

                    draft discarded


















                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f3019%2fhow-can-i-calculate-the-size-of-a-directory%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown

























                    9 Answers
                    9






                    active

                    oldest

                    votes








                    9 Answers
                    9






                    active

                    oldest

                    votes









                    active

                    oldest

                    votes






                    active

                    oldest

                    votes









                    213














                    du -s directory_name


                    Or to get human readable output:



                    du -sh directory_name


                    The -s option means that it won't list the size for each subdirectory, only the total size.






                    share|improve this answer





















                    • 7





                      Actually du's default unit is 512-byte blocks according to POSIX, and kilobytes on Linux (unless the environment variable POSIXLY_CORRECT is set) or with du -k.

                      – Gilles
                      Oct 12 '10 at 17:49






                    • 3





                      @Gilles: Good catch. I've removed the "number of bytes" bit from my answer.

                      – sepp2k
                      Oct 12 '10 at 17:53






                    • 1





                      worked as prescribed

                      – skidadon
                      May 28 '15 at 19:17






                    • 1





                      if the directory is very big and have lots of subdirectories, it takes lots of time... almost 1 min.. is that normal? is there a way to get the size more rapidly?

                      – yeahman
                      Oct 15 '15 at 19:59






                    • 2





                      I needed to calculate the size of my folder "bag", du -sh bag worked perfectly!

                      – Toni Almeida
                      Mar 4 '16 at 12:15
















                    213














                    du -s directory_name


                    Or to get human readable output:



                    du -sh directory_name


                    The -s option means that it won't list the size for each subdirectory, only the total size.






                    share|improve this answer





















                    • 7





                      Actually du's default unit is 512-byte blocks according to POSIX, and kilobytes on Linux (unless the environment variable POSIXLY_CORRECT is set) or with du -k.

                      – Gilles
                      Oct 12 '10 at 17:49






                    • 3





                      @Gilles: Good catch. I've removed the "number of bytes" bit from my answer.

                      – sepp2k
                      Oct 12 '10 at 17:53






                    • 1





                      worked as prescribed

                      – skidadon
                      May 28 '15 at 19:17






                    • 1





                      if the directory is very big and have lots of subdirectories, it takes lots of time... almost 1 min.. is that normal? is there a way to get the size more rapidly?

                      – yeahman
                      Oct 15 '15 at 19:59






                    • 2





                      I needed to calculate the size of my folder "bag", du -sh bag worked perfectly!

                      – Toni Almeida
                      Mar 4 '16 at 12:15














                    213












                    213








                    213







                    du -s directory_name


                    Or to get human readable output:



                    du -sh directory_name


                    The -s option means that it won't list the size for each subdirectory, only the total size.






                    share|improve this answer















                    du -s directory_name


                    Or to get human readable output:



                    du -sh directory_name


                    The -s option means that it won't list the size for each subdirectory, only the total size.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Oct 12 '10 at 17:51

























                    answered Oct 12 '10 at 12:38









                    sepp2ksepp2k

                    4,16711622




                    4,16711622








                    • 7





                      Actually du's default unit is 512-byte blocks according to POSIX, and kilobytes on Linux (unless the environment variable POSIXLY_CORRECT is set) or with du -k.

                      – Gilles
                      Oct 12 '10 at 17:49






                    • 3





                      @Gilles: Good catch. I've removed the "number of bytes" bit from my answer.

                      – sepp2k
                      Oct 12 '10 at 17:53






                    • 1





                      worked as prescribed

                      – skidadon
                      May 28 '15 at 19:17






                    • 1





                      if the directory is very big and have lots of subdirectories, it takes lots of time... almost 1 min.. is that normal? is there a way to get the size more rapidly?

                      – yeahman
                      Oct 15 '15 at 19:59






                    • 2





                      I needed to calculate the size of my folder "bag", du -sh bag worked perfectly!

                      – Toni Almeida
                      Mar 4 '16 at 12:15














                    • 7





                      Actually du's default unit is 512-byte blocks according to POSIX, and kilobytes on Linux (unless the environment variable POSIXLY_CORRECT is set) or with du -k.

                      – Gilles
                      Oct 12 '10 at 17:49






                    • 3





                      @Gilles: Good catch. I've removed the "number of bytes" bit from my answer.

                      – sepp2k
                      Oct 12 '10 at 17:53






                    • 1





                      worked as prescribed

                      – skidadon
                      May 28 '15 at 19:17






                    • 1





                      if the directory is very big and have lots of subdirectories, it takes lots of time... almost 1 min.. is that normal? is there a way to get the size more rapidly?

                      – yeahman
                      Oct 15 '15 at 19:59






                    • 2





                      I needed to calculate the size of my folder "bag", du -sh bag worked perfectly!

                      – Toni Almeida
                      Mar 4 '16 at 12:15








                    7




                    7





                    Actually du's default unit is 512-byte blocks according to POSIX, and kilobytes on Linux (unless the environment variable POSIXLY_CORRECT is set) or with du -k.

                    – Gilles
                    Oct 12 '10 at 17:49





                    Actually du's default unit is 512-byte blocks according to POSIX, and kilobytes on Linux (unless the environment variable POSIXLY_CORRECT is set) or with du -k.

                    – Gilles
                    Oct 12 '10 at 17:49




                    3




                    3





                    @Gilles: Good catch. I've removed the "number of bytes" bit from my answer.

                    – sepp2k
                    Oct 12 '10 at 17:53





                    @Gilles: Good catch. I've removed the "number of bytes" bit from my answer.

                    – sepp2k
                    Oct 12 '10 at 17:53




                    1




                    1





                    worked as prescribed

                    – skidadon
                    May 28 '15 at 19:17





                    worked as prescribed

                    – skidadon
                    May 28 '15 at 19:17




                    1




                    1





                    if the directory is very big and have lots of subdirectories, it takes lots of time... almost 1 min.. is that normal? is there a way to get the size more rapidly?

                    – yeahman
                    Oct 15 '15 at 19:59





                    if the directory is very big and have lots of subdirectories, it takes lots of time... almost 1 min.. is that normal? is there a way to get the size more rapidly?

                    – yeahman
                    Oct 15 '15 at 19:59




                    2




                    2





                    I needed to calculate the size of my folder "bag", du -sh bag worked perfectly!

                    – Toni Almeida
                    Mar 4 '16 at 12:15





                    I needed to calculate the size of my folder "bag", du -sh bag worked perfectly!

                    – Toni Almeida
                    Mar 4 '16 at 12:15













                    7














                    GNU du takes a -b option.



                    See the man page and the info page for more help:




                    -b, --bytes is equivalent to --apparent-size --block-size=1







                    share|improve this answer






























                      7














                      GNU du takes a -b option.



                      See the man page and the info page for more help:




                      -b, --bytes is equivalent to --apparent-size --block-size=1







                      share|improve this answer




























                        7












                        7








                        7







                        GNU du takes a -b option.



                        See the man page and the info page for more help:




                        -b, --bytes is equivalent to --apparent-size --block-size=1







                        share|improve this answer















                        GNU du takes a -b option.



                        See the man page and the info page for more help:




                        -b, --bytes is equivalent to --apparent-size --block-size=1








                        share|improve this answer














                        share|improve this answer



                        share|improve this answer








                        edited Dec 6 '15 at 13:06









                        kenorb

                        8,986374111




                        8,986374111










                        answered Feb 3 '15 at 14:12









                        user2573436user2573436

                        7913




                        7913























                            6














                            While using a separate package such as ncdu may work well, the same comparison of many folders can be done, to some degree, by just giving du a list of folders to size up. For example to compare top-level directories on your system...



                            cd /    
                            sudo du -sh ./*





                            share|improve this answer



















                            • 2





                              More simply, du -sh /*

                              – roaima
                              Sep 10 '15 at 17:00
















                            6














                            While using a separate package such as ncdu may work well, the same comparison of many folders can be done, to some degree, by just giving du a list of folders to size up. For example to compare top-level directories on your system...



                            cd /    
                            sudo du -sh ./*





                            share|improve this answer



















                            • 2





                              More simply, du -sh /*

                              – roaima
                              Sep 10 '15 at 17:00














                            6












                            6








                            6







                            While using a separate package such as ncdu may work well, the same comparison of many folders can be done, to some degree, by just giving du a list of folders to size up. For example to compare top-level directories on your system...



                            cd /    
                            sudo du -sh ./*





                            share|improve this answer













                            While using a separate package such as ncdu may work well, the same comparison of many folders can be done, to some degree, by just giving du a list of folders to size up. For example to compare top-level directories on your system...



                            cd /    
                            sudo du -sh ./*






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Sep 10 '15 at 16:50









                            NFlourishNFlourish

                            6912




                            6912








                            • 2





                              More simply, du -sh /*

                              – roaima
                              Sep 10 '15 at 17:00














                            • 2





                              More simply, du -sh /*

                              – roaima
                              Sep 10 '15 at 17:00








                            2




                            2





                            More simply, du -sh /*

                            – roaima
                            Sep 10 '15 at 17:00





                            More simply, du -sh /*

                            – roaima
                            Sep 10 '15 at 17:00











                            0














                            you can also use ls -ldh:



                            ls -ldh /etc
                            drwxr-xr-x 145 root root 12K 2012-06-02 11:44 /etc



                            -l is for long listing ; -d is for displaying dir info, not the content of the dir, -h is for displaying size in huma readable format.






                            share|improve this answer



















                            • 4





                              This isn't correct, the person asking is clearly looking for footprint of a directory and it's contents on disk. @sepp2k's answer is correct.

                              – blong
                              Jun 5 '12 at 13:16













                            • The ls -ldh command only shows the size of inode structure of a directory. The metric is a reflection of size of the index table of file names, but not the actual size of the file content within the directory.

                              – linbianxiaocao
                              Mar 28 '16 at 18:19
















                            0














                            you can also use ls -ldh:



                            ls -ldh /etc
                            drwxr-xr-x 145 root root 12K 2012-06-02 11:44 /etc



                            -l is for long listing ; -d is for displaying dir info, not the content of the dir, -h is for displaying size in huma readable format.






                            share|improve this answer



















                            • 4





                              This isn't correct, the person asking is clearly looking for footprint of a directory and it's contents on disk. @sepp2k's answer is correct.

                              – blong
                              Jun 5 '12 at 13:16













                            • The ls -ldh command only shows the size of inode structure of a directory. The metric is a reflection of size of the index table of file names, but not the actual size of the file content within the directory.

                              – linbianxiaocao
                              Mar 28 '16 at 18:19














                            0












                            0








                            0







                            you can also use ls -ldh:



                            ls -ldh /etc
                            drwxr-xr-x 145 root root 12K 2012-06-02 11:44 /etc



                            -l is for long listing ; -d is for displaying dir info, not the content of the dir, -h is for displaying size in huma readable format.






                            share|improve this answer













                            you can also use ls -ldh:



                            ls -ldh /etc
                            drwxr-xr-x 145 root root 12K 2012-06-02 11:44 /etc



                            -l is for long listing ; -d is for displaying dir info, not the content of the dir, -h is for displaying size in huma readable format.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Jun 2 '12 at 22:48









                            fromnaboofromnaboo

                            4,01211512




                            4,01211512








                            • 4





                              This isn't correct, the person asking is clearly looking for footprint of a directory and it's contents on disk. @sepp2k's answer is correct.

                              – blong
                              Jun 5 '12 at 13:16













                            • The ls -ldh command only shows the size of inode structure of a directory. The metric is a reflection of size of the index table of file names, but not the actual size of the file content within the directory.

                              – linbianxiaocao
                              Mar 28 '16 at 18:19














                            • 4





                              This isn't correct, the person asking is clearly looking for footprint of a directory and it's contents on disk. @sepp2k's answer is correct.

                              – blong
                              Jun 5 '12 at 13:16













                            • The ls -ldh command only shows the size of inode structure of a directory. The metric is a reflection of size of the index table of file names, but not the actual size of the file content within the directory.

                              – linbianxiaocao
                              Mar 28 '16 at 18:19








                            4




                            4





                            This isn't correct, the person asking is clearly looking for footprint of a directory and it's contents on disk. @sepp2k's answer is correct.

                            – blong
                            Jun 5 '12 at 13:16







                            This isn't correct, the person asking is clearly looking for footprint of a directory and it's contents on disk. @sepp2k's answer is correct.

                            – blong
                            Jun 5 '12 at 13:16















                            The ls -ldh command only shows the size of inode structure of a directory. The metric is a reflection of size of the index table of file names, but not the actual size of the file content within the directory.

                            – linbianxiaocao
                            Mar 28 '16 at 18:19





                            The ls -ldh command only shows the size of inode structure of a directory. The metric is a reflection of size of the index table of file names, but not the actual size of the file content within the directory.

                            – linbianxiaocao
                            Mar 28 '16 at 18:19











                            0














                            du -csh


                            -c produces grand total






                            share|improve this answer


























                            • The -c doesn't make sense to use together with -s, right? -s only displays the size of the specified directory, that is the total size of the directory.

                              – Andreas Storvik Strauman
                              Jun 5 '18 at 10:43
















                            0














                            du -csh


                            -c produces grand total






                            share|improve this answer


























                            • The -c doesn't make sense to use together with -s, right? -s only displays the size of the specified directory, that is the total size of the directory.

                              – Andreas Storvik Strauman
                              Jun 5 '18 at 10:43














                            0












                            0








                            0







                            du -csh


                            -c produces grand total






                            share|improve this answer















                            du -csh


                            -c produces grand total







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Sep 1 '16 at 19:57









                            Jeff Schaller

                            44.3k1162143




                            44.3k1162143










                            answered Sep 1 '16 at 18:49









                            Kalpesh SoniKalpesh Soni

                            1113




                            1113













                            • The -c doesn't make sense to use together with -s, right? -s only displays the size of the specified directory, that is the total size of the directory.

                              – Andreas Storvik Strauman
                              Jun 5 '18 at 10:43



















                            • The -c doesn't make sense to use together with -s, right? -s only displays the size of the specified directory, that is the total size of the directory.

                              – Andreas Storvik Strauman
                              Jun 5 '18 at 10:43

















                            The -c doesn't make sense to use together with -s, right? -s only displays the size of the specified directory, that is the total size of the directory.

                            – Andreas Storvik Strauman
                            Jun 5 '18 at 10:43





                            The -c doesn't make sense to use together with -s, right? -s only displays the size of the specified directory, that is the total size of the directory.

                            – Andreas Storvik Strauman
                            Jun 5 '18 at 10:43











                            0














                            Try



                            du -hax --max-depth=1 / | grep '[0-9]G' | sort -nr


                            This helps find large directories to then sift through using du -sh ./*






                            share|improve this answer






























                              0














                              Try



                              du -hax --max-depth=1 / | grep '[0-9]G' | sort -nr


                              This helps find large directories to then sift through using du -sh ./*






                              share|improve this answer




























                                0












                                0








                                0







                                Try



                                du -hax --max-depth=1 / | grep '[0-9]G' | sort -nr


                                This helps find large directories to then sift through using du -sh ./*






                                share|improve this answer















                                Try



                                du -hax --max-depth=1 / | grep '[0-9]G' | sort -nr


                                This helps find large directories to then sift through using du -sh ./*







                                share|improve this answer














                                share|improve this answer



                                share|improve this answer








                                edited Dec 1 '16 at 7:39









                                countermode

                                5,32842145




                                5,32842145










                                answered Dec 1 '16 at 7:33









                                rollinjackrollinjack

                                1




                                1























                                    0














                                    I always install the "ncdu" package and see all the output of all directories with graphical representation.
                                    This is because I usually need to know what's taking up the most disk space on my machines, regardless of how much a single directory sums up.



                                    Usage: sudo ncdu / (You do not need sudo for folders on which you have read permission).



                                    It will take a while to scan disk usage statistics on the whole file system. It has a nice command line graphical representation and included keyboard navigation using the arrow keys, like going deeper or higher in the scanned path. You can also delete items by pressing D.






                                    share|improve this answer






























                                      0














                                      I always install the "ncdu" package and see all the output of all directories with graphical representation.
                                      This is because I usually need to know what's taking up the most disk space on my machines, regardless of how much a single directory sums up.



                                      Usage: sudo ncdu / (You do not need sudo for folders on which you have read permission).



                                      It will take a while to scan disk usage statistics on the whole file system. It has a nice command line graphical representation and included keyboard navigation using the arrow keys, like going deeper or higher in the scanned path. You can also delete items by pressing D.






                                      share|improve this answer




























                                        0












                                        0








                                        0







                                        I always install the "ncdu" package and see all the output of all directories with graphical representation.
                                        This is because I usually need to know what's taking up the most disk space on my machines, regardless of how much a single directory sums up.



                                        Usage: sudo ncdu / (You do not need sudo for folders on which you have read permission).



                                        It will take a while to scan disk usage statistics on the whole file system. It has a nice command line graphical representation and included keyboard navigation using the arrow keys, like going deeper or higher in the scanned path. You can also delete items by pressing D.






                                        share|improve this answer















                                        I always install the "ncdu" package and see all the output of all directories with graphical representation.
                                        This is because I usually need to know what's taking up the most disk space on my machines, regardless of how much a single directory sums up.



                                        Usage: sudo ncdu / (You do not need sudo for folders on which you have read permission).



                                        It will take a while to scan disk usage statistics on the whole file system. It has a nice command line graphical representation and included keyboard navigation using the arrow keys, like going deeper or higher in the scanned path. You can also delete items by pressing D.







                                        share|improve this answer














                                        share|improve this answer



                                        share|improve this answer








                                        edited Apr 3 '17 at 8:44









                                        Berry M.

                                        1033




                                        1033










                                        answered Jun 23 '15 at 8:57









                                        EtescartzEtescartz

                                        91




                                        91























                                            0














                                            You can use "file-size.sh" from the awk Velour library:



                                            ls -ARgo "$@" | awk '{q += $3} END {print q}'





                                            share|improve this answer






























                                              0














                                              You can use "file-size.sh" from the awk Velour library:



                                              ls -ARgo "$@" | awk '{q += $3} END {print q}'





                                              share|improve this answer




























                                                0












                                                0








                                                0







                                                You can use "file-size.sh" from the awk Velour library:



                                                ls -ARgo "$@" | awk '{q += $3} END {print q}'





                                                share|improve this answer















                                                You can use "file-size.sh" from the awk Velour library:



                                                ls -ARgo "$@" | awk '{q += $3} END {print q}'






                                                share|improve this answer














                                                share|improve this answer



                                                share|improve this answer








                                                edited Feb 13 '18 at 4:23

























                                                answered Mar 29 '17 at 0:39









                                                Steven PennySteven Penny

                                                1




                                                1























                                                    0














                                                    du -hd1



                                                    will list in human-readable format the sizes of all the directories, e.g.



                                                    656K    ./rubberband
                                                    2.2M ./lame
                                                    652K ./pkg-config





                                                    share|improve this answer








                                                    New contributor




                                                    Boris Yakubchik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                    Check out our Code of Conduct.

























                                                      0














                                                      du -hd1



                                                      will list in human-readable format the sizes of all the directories, e.g.



                                                      656K    ./rubberband
                                                      2.2M ./lame
                                                      652K ./pkg-config





                                                      share|improve this answer








                                                      New contributor




                                                      Boris Yakubchik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                      Check out our Code of Conduct.























                                                        0












                                                        0








                                                        0







                                                        du -hd1



                                                        will list in human-readable format the sizes of all the directories, e.g.



                                                        656K    ./rubberband
                                                        2.2M ./lame
                                                        652K ./pkg-config





                                                        share|improve this answer








                                                        New contributor




                                                        Boris Yakubchik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                        Check out our Code of Conduct.










                                                        du -hd1



                                                        will list in human-readable format the sizes of all the directories, e.g.



                                                        656K    ./rubberband
                                                        2.2M ./lame
                                                        652K ./pkg-config






                                                        share|improve this answer








                                                        New contributor




                                                        Boris Yakubchik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                        Check out our Code of Conduct.









                                                        share|improve this answer



                                                        share|improve this answer






                                                        New contributor




                                                        Boris Yakubchik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                        Check out our Code of Conduct.









                                                        answered 26 mins ago









                                                        Boris YakubchikBoris Yakubchik

                                                        1012




                                                        1012




                                                        New contributor




                                                        Boris Yakubchik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                        Check out our Code of Conduct.





                                                        New contributor





                                                        Boris Yakubchik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                        Check out our Code of Conduct.






                                                        Boris Yakubchik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                        Check out our Code of Conduct.






























                                                            draft saved

                                                            draft discarded




















































                                                            Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                                            • Please be sure to answer the question. Provide details and share your research!

                                                            But avoid



                                                            • Asking for help, clarification, or responding to other answers.

                                                            • Making statements based on opinion; back them up with references or personal experience.


                                                            To learn more, see our tips on writing great answers.




                                                            draft saved


                                                            draft discarded














                                                            StackExchange.ready(
                                                            function () {
                                                            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f3019%2fhow-can-i-calculate-the-size-of-a-directory%23new-answer', 'question_page');
                                                            }
                                                            );

                                                            Post as a guest















                                                            Required, but never shown





















































                                                            Required, but never shown














                                                            Required, but never shown












                                                            Required, but never shown







                                                            Required, but never shown

































                                                            Required, but never shown














                                                            Required, but never shown












                                                            Required, but never shown







                                                            Required, but never shown







                                                            Popular posts from this blog

                                                            濃尾地震

                                                            How to rewrite equation of hyperbola in standard form

                                                            No ethernet ip address in my vocore2