Why is /home twice as big as expected?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I was checking my disk usage today, and ran the following commands (using sudo so I didn't get "permission denied")



$sudo du -hs /home
26G /home

$sudo ls -la /home
total 24
drwxr-xr-x 4 root root 4096 Dec 27 2017 .
drwxr-xr-x 25 root root 4096 Oct 1 17:39 ..
drwxrwxr-x 3 root root 4096 Dec 27 2017 .ecryptfs
drwx------ 53 paper paper 12288 Oct 6 14:38 paper`

$sudo du -hs /home/*
13G /paper


Why is my /home directory exactly twice the size of my user directory, which looks like the only thing in /home?










share|improve this question







New contributor




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























    up vote
    1
    down vote

    favorite












    I was checking my disk usage today, and ran the following commands (using sudo so I didn't get "permission denied")



    $sudo du -hs /home
    26G /home

    $sudo ls -la /home
    total 24
    drwxr-xr-x 4 root root 4096 Dec 27 2017 .
    drwxr-xr-x 25 root root 4096 Oct 1 17:39 ..
    drwxrwxr-x 3 root root 4096 Dec 27 2017 .ecryptfs
    drwx------ 53 paper paper 12288 Oct 6 14:38 paper`

    $sudo du -hs /home/*
    13G /paper


    Why is my /home directory exactly twice the size of my user directory, which looks like the only thing in /home?










    share|improve this question







    New contributor




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





















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I was checking my disk usage today, and ran the following commands (using sudo so I didn't get "permission denied")



      $sudo du -hs /home
      26G /home

      $sudo ls -la /home
      total 24
      drwxr-xr-x 4 root root 4096 Dec 27 2017 .
      drwxr-xr-x 25 root root 4096 Oct 1 17:39 ..
      drwxrwxr-x 3 root root 4096 Dec 27 2017 .ecryptfs
      drwx------ 53 paper paper 12288 Oct 6 14:38 paper`

      $sudo du -hs /home/*
      13G /paper


      Why is my /home directory exactly twice the size of my user directory, which looks like the only thing in /home?










      share|improve this question







      New contributor




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











      I was checking my disk usage today, and ran the following commands (using sudo so I didn't get "permission denied")



      $sudo du -hs /home
      26G /home

      $sudo ls -la /home
      total 24
      drwxr-xr-x 4 root root 4096 Dec 27 2017 .
      drwxr-xr-x 25 root root 4096 Oct 1 17:39 ..
      drwxrwxr-x 3 root root 4096 Dec 27 2017 .ecryptfs
      drwx------ 53 paper paper 12288 Oct 6 14:38 paper`

      $sudo du -hs /home/*
      13G /paper


      Why is my /home directory exactly twice the size of my user directory, which looks like the only thing in /home?







      filesystems disk-usage






      share|improve this question







      New contributor




      OnLinedPaper 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 question







      New contributor




      OnLinedPaper 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 question




      share|improve this question






      New contributor




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









      asked 27 mins ago









      OnLinedPaper

      61




      61




      New contributor




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





      New contributor





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






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




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          4
          down vote













          Try executing shopt dotglob in that same shell.



          Chances are that dotglob is off, which causes * expansion (globbing) to not include files and directories the names of which begin with . (including the special directory entries . and ..).



          Thus, when you run du -hs /home it counts everything in that directory, but du -hs /home/* expands to only du -hs /home/paper.



          Since presumably /home/.ecryptfs contains the encrypted data, it makes sense that it would be about the same size as the decrypted data. Therefore, the files effectively get counted twice, but only when you point du at the parent directory.



          If you shopt -s dotglob to turn on the dotglob setting in that shell session, then run sudo du -hs /home/* again, you will likely see that it shows as the same size as if you run sudo du -hs /home.






          share|improve this answer




















            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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );






            OnLinedPaper is a new contributor. Be nice, and check out our Code of Conduct.









             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f473678%2fwhy-is-home-twice-as-big-as-expected%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            4
            down vote













            Try executing shopt dotglob in that same shell.



            Chances are that dotglob is off, which causes * expansion (globbing) to not include files and directories the names of which begin with . (including the special directory entries . and ..).



            Thus, when you run du -hs /home it counts everything in that directory, but du -hs /home/* expands to only du -hs /home/paper.



            Since presumably /home/.ecryptfs contains the encrypted data, it makes sense that it would be about the same size as the decrypted data. Therefore, the files effectively get counted twice, but only when you point du at the parent directory.



            If you shopt -s dotglob to turn on the dotglob setting in that shell session, then run sudo du -hs /home/* again, you will likely see that it shows as the same size as if you run sudo du -hs /home.






            share|improve this answer
























              up vote
              4
              down vote













              Try executing shopt dotglob in that same shell.



              Chances are that dotglob is off, which causes * expansion (globbing) to not include files and directories the names of which begin with . (including the special directory entries . and ..).



              Thus, when you run du -hs /home it counts everything in that directory, but du -hs /home/* expands to only du -hs /home/paper.



              Since presumably /home/.ecryptfs contains the encrypted data, it makes sense that it would be about the same size as the decrypted data. Therefore, the files effectively get counted twice, but only when you point du at the parent directory.



              If you shopt -s dotglob to turn on the dotglob setting in that shell session, then run sudo du -hs /home/* again, you will likely see that it shows as the same size as if you run sudo du -hs /home.






              share|improve this answer






















                up vote
                4
                down vote










                up vote
                4
                down vote









                Try executing shopt dotglob in that same shell.



                Chances are that dotglob is off, which causes * expansion (globbing) to not include files and directories the names of which begin with . (including the special directory entries . and ..).



                Thus, when you run du -hs /home it counts everything in that directory, but du -hs /home/* expands to only du -hs /home/paper.



                Since presumably /home/.ecryptfs contains the encrypted data, it makes sense that it would be about the same size as the decrypted data. Therefore, the files effectively get counted twice, but only when you point du at the parent directory.



                If you shopt -s dotglob to turn on the dotglob setting in that shell session, then run sudo du -hs /home/* again, you will likely see that it shows as the same size as if you run sudo du -hs /home.






                share|improve this answer












                Try executing shopt dotglob in that same shell.



                Chances are that dotglob is off, which causes * expansion (globbing) to not include files and directories the names of which begin with . (including the special directory entries . and ..).



                Thus, when you run du -hs /home it counts everything in that directory, but du -hs /home/* expands to only du -hs /home/paper.



                Since presumably /home/.ecryptfs contains the encrypted data, it makes sense that it would be about the same size as the decrypted data. Therefore, the files effectively get counted twice, but only when you point du at the parent directory.



                If you shopt -s dotglob to turn on the dotglob setting in that shell session, then run sudo du -hs /home/* again, you will likely see that it shows as the same size as if you run sudo du -hs /home.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 19 mins ago









                Michael Kjörling

                16k84698




                16k84698




















                    OnLinedPaper is a new contributor. Be nice, and check out our Code of Conduct.









                     

                    draft saved


                    draft discarded


















                    OnLinedPaper is a new contributor. Be nice, and check out our Code of Conduct.












                    OnLinedPaper is a new contributor. Be nice, and check out our Code of Conduct.











                    OnLinedPaper is a new contributor. Be nice, and check out our Code of Conduct.













                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f473678%2fwhy-is-home-twice-as-big-as-expected%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

                    Long meetings (6-7 hours a day): Being “babysat” by supervisor

                    Confectionery