LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   [ubuntu] File partitions and memory management (https://www.linuxquestions.org/questions/linux-newbie-8/%5Bubuntu%5D-file-partitions-and-memory-management-4175635893/)

eco_bach 08-07-2018 02:47 PM

[ubuntu] File partitions and memory management
 
Ok so running the command

$df -h

returns the following

Quote:

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 free up space in /dev/sdc2? ie How to determine exactly which files are taking up the most space?

Rickkkk 08-07-2018 03:23 PM

Quote:

Originally Posted by eco_bach (Post 5889077)
Ok so running the command

$df -h

returns the following


How do I free up space in /dev/sdc2? ie How to determine exactly which files are taking up the most space?

Hi eco_bach,

Your /dev/sdc2 is your main system (root) directory (notice that it is mounted as "/"). You have allocated 40GB to it, which should normally be sufficient.

A useful GUI program for illustrating disk usage is Disk Usage Analyzer (formerly baobab) - available on a wide variety of distros and I believe included standard with Gnome. I suggest you install the package provided in your distro's repositories (if not already installed) and run it to identify directories and files taking up the most space.

Cheers.

lougavulin 08-07-2018 05:32 PM

You could first check if some blocks are reserved for root :
Code:

tune2fs -l /dev/sdc2 | grep "Reserved block count"
And try to see which files are the biggest (10 biggest here) :
Code:

find / -xdev -printf '%s %p\n'| sort -nr | head -10

AwesomeMachine 08-08-2018 03:06 AM

Another command to find gigabytes large files and directories is
Code:

$ du -m -h | grep G


All times are GMT -5. The time now is 02:43 PM.