Big file on ubuntu 16.04 virtual machine












0















When I execute sudo du -h --max-depth=1 I get this result:



enter image description here



The 13g are taking the whole space of the virtual machine but when I execute ls -la the files size total size is only 96k.



I'm not sure about what is happening but the virtual machine can not be used.










share|improve this question

























  • Please clarify what your actual issue is, as everything seems to be normal.

    – meskobalazs
    Jan 29 at 9:46











  • ls -la gives you the total space of the files in the root directory itself (if you have any), plus a couple of K for each directory. The du command gives the total space of the files in each directory and below. As @meskobalazs states, there is no contradiction here.

    – Jos
    Jan 29 at 9:50











  • Welcome to Ask Ubuntu! Please do not post screenshots of the terminal. Paste the text directly to your question and apply code formatting.

    – Melebius
    Jan 29 at 12:36
















0















When I execute sudo du -h --max-depth=1 I get this result:



enter image description here



The 13g are taking the whole space of the virtual machine but when I execute ls -la the files size total size is only 96k.



I'm not sure about what is happening but the virtual machine can not be used.










share|improve this question

























  • Please clarify what your actual issue is, as everything seems to be normal.

    – meskobalazs
    Jan 29 at 9:46











  • ls -la gives you the total space of the files in the root directory itself (if you have any), plus a couple of K for each directory. The du command gives the total space of the files in each directory and below. As @meskobalazs states, there is no contradiction here.

    – Jos
    Jan 29 at 9:50











  • Welcome to Ask Ubuntu! Please do not post screenshots of the terminal. Paste the text directly to your question and apply code formatting.

    – Melebius
    Jan 29 at 12:36














0












0








0








When I execute sudo du -h --max-depth=1 I get this result:



enter image description here



The 13g are taking the whole space of the virtual machine but when I execute ls -la the files size total size is only 96k.



I'm not sure about what is happening but the virtual machine can not be used.










share|improve this question
















When I execute sudo du -h --max-depth=1 I get this result:



enter image description here



The 13g are taking the whole space of the virtual machine but when I execute ls -la the files size total size is only 96k.



I'm not sure about what is happening but the virtual machine can not be used.







16.04 du






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 29 at 10:44









guntbert

9,262133170




9,262133170










asked Jan 29 at 9:41









af_di4af_di4

31




31













  • Please clarify what your actual issue is, as everything seems to be normal.

    – meskobalazs
    Jan 29 at 9:46











  • ls -la gives you the total space of the files in the root directory itself (if you have any), plus a couple of K for each directory. The du command gives the total space of the files in each directory and below. As @meskobalazs states, there is no contradiction here.

    – Jos
    Jan 29 at 9:50











  • Welcome to Ask Ubuntu! Please do not post screenshots of the terminal. Paste the text directly to your question and apply code formatting.

    – Melebius
    Jan 29 at 12:36



















  • Please clarify what your actual issue is, as everything seems to be normal.

    – meskobalazs
    Jan 29 at 9:46











  • ls -la gives you the total space of the files in the root directory itself (if you have any), plus a couple of K for each directory. The du command gives the total space of the files in each directory and below. As @meskobalazs states, there is no contradiction here.

    – Jos
    Jan 29 at 9:50











  • Welcome to Ask Ubuntu! Please do not post screenshots of the terminal. Paste the text directly to your question and apply code formatting.

    – Melebius
    Jan 29 at 12:36

















Please clarify what your actual issue is, as everything seems to be normal.

– meskobalazs
Jan 29 at 9:46





Please clarify what your actual issue is, as everything seems to be normal.

– meskobalazs
Jan 29 at 9:46













ls -la gives you the total space of the files in the root directory itself (if you have any), plus a couple of K for each directory. The du command gives the total space of the files in each directory and below. As @meskobalazs states, there is no contradiction here.

– Jos
Jan 29 at 9:50





ls -la gives you the total space of the files in the root directory itself (if you have any), plus a couple of K for each directory. The du command gives the total space of the files in each directory and below. As @meskobalazs states, there is no contradiction here.

– Jos
Jan 29 at 9:50













Welcome to Ask Ubuntu! Please do not post screenshots of the terminal. Paste the text directly to your question and apply code formatting.

– Melebius
Jan 29 at 12:36





Welcome to Ask Ubuntu! Please do not post screenshots of the terminal. Paste the text directly to your question and apply code formatting.

– Melebius
Jan 29 at 12:36










2 Answers
2






active

oldest

votes


















2














A large amount of space is being used by /var which is likely related to log files. For whatever reason, systemd likes to use a lot of disk space storing almost every bit of history made to log files. You can clean it up using:



sudo journalctl --vacuum-size=50M


This will delete all the old log files leaving just 50MB of logs remaining, which is likely more than enough for most basic logging needs. You can make this a permanent setting by creating/modifying the /etc/systemd/journald.conf file and putting:



SystemMaxUse=50M





share|improve this answer































    0














    When you want to find out where the big files are on your system you must tell du to sum up the disk usage for every directory.



    $sudo du -sh /*
    13M /bin
    184M /boot
    4,0K /cdrom
    4,0M /core
    4,0K /dev
    41M /etc
    63G /home
    --- snip


    From here on you better omit the -h and instead let the output be sorted by numbers. In my case I would descend into /home (the biggest directory).



    sudo du -s /home/* | sort -n | head -3


    ( -n sorts numerically instead of alphabetically, head -3 only displays the first three entries)



    Now I again select the biggest directory and so forth until I find the culprit.



    $sudo du -s /home/* | sort -nr |head -3  
    61121744 /home/g
    4306660 /home/andrea
    37032 /home/test

    $sudo du -s /home/g/* | sort -nr |head -3
    10054692 /home/g/temp
    8006620 /home/g/Downloads
    5056024 /home/g/Documents


    In case your have "hidden" directories (most likely in a home directory) you additionally use a slightly different command



    $sudo du -s /home/g/.* | sort -nr |head -3
    12754648 /home/g/.vagrant.d
    4400684 /home/g/.local
    3311584 /home/g/.cache





    share|improve this answer

























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      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: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      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%2faskubuntu.com%2fquestions%2f1113767%2fbig-file-on-ubuntu-16-04-virtual-machine%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      2














      A large amount of space is being used by /var which is likely related to log files. For whatever reason, systemd likes to use a lot of disk space storing almost every bit of history made to log files. You can clean it up using:



      sudo journalctl --vacuum-size=50M


      This will delete all the old log files leaving just 50MB of logs remaining, which is likely more than enough for most basic logging needs. You can make this a permanent setting by creating/modifying the /etc/systemd/journald.conf file and putting:



      SystemMaxUse=50M





      share|improve this answer




























        2














        A large amount of space is being used by /var which is likely related to log files. For whatever reason, systemd likes to use a lot of disk space storing almost every bit of history made to log files. You can clean it up using:



        sudo journalctl --vacuum-size=50M


        This will delete all the old log files leaving just 50MB of logs remaining, which is likely more than enough for most basic logging needs. You can make this a permanent setting by creating/modifying the /etc/systemd/journald.conf file and putting:



        SystemMaxUse=50M





        share|improve this answer


























          2












          2








          2







          A large amount of space is being used by /var which is likely related to log files. For whatever reason, systemd likes to use a lot of disk space storing almost every bit of history made to log files. You can clean it up using:



          sudo journalctl --vacuum-size=50M


          This will delete all the old log files leaving just 50MB of logs remaining, which is likely more than enough for most basic logging needs. You can make this a permanent setting by creating/modifying the /etc/systemd/journald.conf file and putting:



          SystemMaxUse=50M





          share|improve this answer













          A large amount of space is being used by /var which is likely related to log files. For whatever reason, systemd likes to use a lot of disk space storing almost every bit of history made to log files. You can clean it up using:



          sudo journalctl --vacuum-size=50M


          This will delete all the old log files leaving just 50MB of logs remaining, which is likely more than enough for most basic logging needs. You can make this a permanent setting by creating/modifying the /etc/systemd/journald.conf file and putting:



          SystemMaxUse=50M






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 29 at 10:52









          Kristopher IvesKristopher Ives

          2,83211524




          2,83211524

























              0














              When you want to find out where the big files are on your system you must tell du to sum up the disk usage for every directory.



              $sudo du -sh /*
              13M /bin
              184M /boot
              4,0K /cdrom
              4,0M /core
              4,0K /dev
              41M /etc
              63G /home
              --- snip


              From here on you better omit the -h and instead let the output be sorted by numbers. In my case I would descend into /home (the biggest directory).



              sudo du -s /home/* | sort -n | head -3


              ( -n sorts numerically instead of alphabetically, head -3 only displays the first three entries)



              Now I again select the biggest directory and so forth until I find the culprit.



              $sudo du -s /home/* | sort -nr |head -3  
              61121744 /home/g
              4306660 /home/andrea
              37032 /home/test

              $sudo du -s /home/g/* | sort -nr |head -3
              10054692 /home/g/temp
              8006620 /home/g/Downloads
              5056024 /home/g/Documents


              In case your have "hidden" directories (most likely in a home directory) you additionally use a slightly different command



              $sudo du -s /home/g/.* | sort -nr |head -3
              12754648 /home/g/.vagrant.d
              4400684 /home/g/.local
              3311584 /home/g/.cache





              share|improve this answer






























                0














                When you want to find out where the big files are on your system you must tell du to sum up the disk usage for every directory.



                $sudo du -sh /*
                13M /bin
                184M /boot
                4,0K /cdrom
                4,0M /core
                4,0K /dev
                41M /etc
                63G /home
                --- snip


                From here on you better omit the -h and instead let the output be sorted by numbers. In my case I would descend into /home (the biggest directory).



                sudo du -s /home/* | sort -n | head -3


                ( -n sorts numerically instead of alphabetically, head -3 only displays the first three entries)



                Now I again select the biggest directory and so forth until I find the culprit.



                $sudo du -s /home/* | sort -nr |head -3  
                61121744 /home/g
                4306660 /home/andrea
                37032 /home/test

                $sudo du -s /home/g/* | sort -nr |head -3
                10054692 /home/g/temp
                8006620 /home/g/Downloads
                5056024 /home/g/Documents


                In case your have "hidden" directories (most likely in a home directory) you additionally use a slightly different command



                $sudo du -s /home/g/.* | sort -nr |head -3
                12754648 /home/g/.vagrant.d
                4400684 /home/g/.local
                3311584 /home/g/.cache





                share|improve this answer




























                  0












                  0








                  0







                  When you want to find out where the big files are on your system you must tell du to sum up the disk usage for every directory.



                  $sudo du -sh /*
                  13M /bin
                  184M /boot
                  4,0K /cdrom
                  4,0M /core
                  4,0K /dev
                  41M /etc
                  63G /home
                  --- snip


                  From here on you better omit the -h and instead let the output be sorted by numbers. In my case I would descend into /home (the biggest directory).



                  sudo du -s /home/* | sort -n | head -3


                  ( -n sorts numerically instead of alphabetically, head -3 only displays the first three entries)



                  Now I again select the biggest directory and so forth until I find the culprit.



                  $sudo du -s /home/* | sort -nr |head -3  
                  61121744 /home/g
                  4306660 /home/andrea
                  37032 /home/test

                  $sudo du -s /home/g/* | sort -nr |head -3
                  10054692 /home/g/temp
                  8006620 /home/g/Downloads
                  5056024 /home/g/Documents


                  In case your have "hidden" directories (most likely in a home directory) you additionally use a slightly different command



                  $sudo du -s /home/g/.* | sort -nr |head -3
                  12754648 /home/g/.vagrant.d
                  4400684 /home/g/.local
                  3311584 /home/g/.cache





                  share|improve this answer















                  When you want to find out where the big files are on your system you must tell du to sum up the disk usage for every directory.



                  $sudo du -sh /*
                  13M /bin
                  184M /boot
                  4,0K /cdrom
                  4,0M /core
                  4,0K /dev
                  41M /etc
                  63G /home
                  --- snip


                  From here on you better omit the -h and instead let the output be sorted by numbers. In my case I would descend into /home (the biggest directory).



                  sudo du -s /home/* | sort -n | head -3


                  ( -n sorts numerically instead of alphabetically, head -3 only displays the first three entries)



                  Now I again select the biggest directory and so forth until I find the culprit.



                  $sudo du -s /home/* | sort -nr |head -3  
                  61121744 /home/g
                  4306660 /home/andrea
                  37032 /home/test

                  $sudo du -s /home/g/* | sort -nr |head -3
                  10054692 /home/g/temp
                  8006620 /home/g/Downloads
                  5056024 /home/g/Documents


                  In case your have "hidden" directories (most likely in a home directory) you additionally use a slightly different command



                  $sudo du -s /home/g/.* | sort -nr |head -3
                  12754648 /home/g/.vagrant.d
                  4400684 /home/g/.local
                  3311584 /home/g/.cache






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jan 29 at 10:42

























                  answered Jan 29 at 10:33









                  guntbertguntbert

                  9,262133170




                  9,262133170






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • 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%2faskubuntu.com%2fquestions%2f1113767%2fbig-file-on-ubuntu-16-04-virtual-machine%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

                      flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                      Mangá

                      Eduardo VII do Reino Unido