Announcement

Collapse
No announcement yet.

Low on disk space on Home directory

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Low on disk space on Home directory

    I have an asus eeepc with one 4GB and one 16GB drive

    Kubuntu 9.10 is on the 4GB drive
    It is also my Home mount but I don't store any files there. I just have links to folders on my 16GB drive.

    I am down to 5% free space. I don't know how to approach this.

    In Windows I'd go after the temp files, uninstall unnecessary pgms, etc.

    How do I figure out what is taking up so much room or is Kubuntu that big?

    I have GDMap but I don't know how to get it to show me the 4GB drive.

    I also don't know how to see which programs are space hogs. (e.g is Amarok big? I never use it)

    any help appreciated thanks


    KDE neon LTS 5.12

    #2
    Re: Low on disk space on Home directory

    The following PERL script might be of some assistance (I call it diskUsage.pl):

    #! /usr/bin/perl

    #=-
    #=- Print total bytes used by files beneath the specified directory.

    #=- Only unique inode numbers are counted, so that multiple hard links
    #=- to the same file only count once toward the total file size for the
    #=- dir.
    #=-

    #=- use strict;
    use warnings;

    my $verbose = 0;

    # open a pipe to a find command to locate files starting in the specified
    # directory and print a simply-formatted string for each...
    my $find_targets = join ' ', @ARGV;

    open my $found_list, '-|', qq{find $find_targets -type f -printf "%s\tinode: %i\tlink count: %n\t%p\n"} or die "Can't open find command";

    # process our simple output, keeping track of inode numbers and file

    sizes... my %h;
    while( my $output_line = <$found_list> ) {
    my ($size, $inode) = $output_line =~ m/^(\d+)\s+(inode: \d+)/;
    $h{$inode} = $size;
    print $output_line if $verbose;

    }

    # calculate and display total...
    my @ordered = sort values %h;
    my $total = 0;
    map { $total += $_ } @ordered;
    print "-" x 25 . "\nTOTAL SIZE (UNIQUE FILES): " . $total . "\n";

    ################################################## ########################

    Comment


      #3
      Re: Low on disk space on Home directory

      Code:
      sudo apt-get kdirstat
      kdirstat will show you what's what with disk usage in a graficall maner

      VINNY
      i7 4core HT 8MB L3 2.9GHz
      16GB RAM
      Nvidia GTX 860M 4GB RAM 1152 cuda cores

      Comment


        #4
        Re: Low on disk space on Home directory

        There are lot of tools to examine the disk usage > FAQ: Free Disk Space


        I have find the Filelight handy.

        [img width=400 height=358]http://img690.imageshack.us/img690/480/filelight.png[/img]
        Before you edit, BACKUP !

        Why there are dead links ?
        1. Thread: Please explain how to access old kubuntu forum posts
        2. Thread: Lost Information

        Comment


          #5
          Re: Low on disk space on Home directory

          sudo apt-get clean and sudo apt-get autoclean might already make a difference
          Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

          Comment


            #6
            Re: Low on disk space on Home directory

            To learn which directory is holding an unusual amount (number or size) of files, use

            Code:
            du -h --max-depth=1 | sort -n
            first at the "/", or root directory, and then change to whichever directory appears to have an unusually large size, and use it again to see which sub-directory is unusually large.

            Another method is to produce a text file of all your files and their sizes, and then review it to see where the problem is:

            Code:
            du / | sort -n > du.txt

            Comment


              #7
              Re: Low on disk space on Home directory

              for a checklist, use of du, etc:

              Privacy Cleanup 101
              http://kubuntuforums.net/forums/inde....msg115011#new
              => See Reply#7
              Disk/Partition Full! Warning! What to do about it: a decision tree
              Checking your space: ls, df, du; Konsole, configure history (# lines to show)
              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

              Comment


                #8
                Re: Low on disk space on Home directory

                Use konqueror and switch to File Size view

                Comment


                  #9
                  Re: Low on disk space on Home directory

                  Originally posted by stychokiller
                  The following PERL script might be of some assistance (I call it diskUsage.pl):

                  #! /usr/bin/perl

                  #=-
                  #=- Print total bytes used by files beneath the specified directory.

                  #=- Only unique inode numbers are counted, so that multiple hard links
                  #=- to the same file only count once toward the total file size for the
                  #=- dir.
                  #=-

                  #=- use strict;
                  use warnings;

                  my $verbose = 0;

                  # open a pipe to a find command to locate files starting in the specified
                  # directory and print a simply-formatted string for each...
                  my $find_targets = join ' ', @ARGV;

                  open my $found_list, '-|', qq{find $find_targets -type f -printf "%s\tinode: %i\tlink count: %n\t%p\n"} or die "Can't open find command";

                  # process our simple output, keeping track of inode numbers and file

                  sizes... my %h;
                  while( my $output_line = <$found_list> ) {
                  my ($size, $inode) = $output_line =~ m/^(\d+)\s+(inode: \d+)/;
                  $h{$inode} = $size;
                  print $output_line if $verbose;

                  }

                  # calculate and display total...
                  my @ordered = sort values %h;
                  my $total = 0;
                  map { $total += $_ } @ordered;
                  print "-" x 25 . "\nTOTAL SIZE (UNIQUE FILES): " . $total . "\n";

                  ################################################## ########################

                  I haven't used perl in ages. Here's the ouput of your script. Apparently doesn't like the "sizes" function:
                  Code:
                  $ ./p-script
                  Unquoted string "sizes" may clash with future reserved word at ./p-script line 24.
                  Useless use of range (or flop) in void context at ./p-script line 24.
                  Argument "sizes" isn't numeric in range (or flip) at ./p-script line 24.
                  Use of uninitialized value within %h in range (or flip) at ./p-script line 24.
                  -------------------------
                  TOTAL SIZE (UNIQUE FILES): 28313
                  Boot Info Script

                  Comment

                  Working...
                  X