2

Ok so running the command in Ubuntu Mate 18.04

$df -h

returns the following

udev             32G    0    32G    0%    /dev 
tmpfs           6.3G    2.4M    6.3G    1%    /run 
/dev/sdc2        40G    36G    1.4G    97%    / 
tmpfs            32G    187M    32G    1%    /dev/shm 
tmpfs           5.0M    4.0K    5.0M    1%    /run/lock 
tmpfs            32G    0    32G    0%    /sys/fs/cgroup
/dev/sdc1       549M    5.8M    544M    2%    /boot/efi 
/dev/sdc3       630G    94G    505G    16%    /home 
tmpfs           6.3G    56K    6.3G    1%    /run/user/1000

How do I determine which files are taking up the most space on /sdc2?

  • done Ubuntu Mate 18.04 – Bachalo Aug 8 '18 at 15:49
3

For a command line answer, du -a -h --all | sort -h will show files, in the current directory and its subdirectories. Perform that after moving to the root of /sdc2 .

As an alternative, install ncdu then run
sudo apt install ncdu

and then run it, also from the root of /sdc2, to see which directories are consuming the most space, then go to that directory and run ls -h to find the files in question.

You can also use find -type f -exec du -Sh {} + | sort -rh | head -n 10 to find your 10 largest files; again, start in the root of /sdc2 .

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.