Disk space

Windmill

Member
Joined
Jul 14, 2024
Messages
42
Reaction score
17
Credits
256
Hi folks I'm new to the forum but have used a linux OS for around 3 years.
Bit of a noob linux wise.
I use zorin 16.3 lite on a decent spec laptop and my question is how to know what a particular app/prog is using.
Diskwise that is. I fully understand use of an app relates to what is being used at the time

The disk usage analyzer in zorin gives me info but not what I'm looking for.
I'm sure there is an easy way to know hence the question.
 


@Lighthouse wrote:
The disk usage analyzer in zorin gives me info but not what I'm looking for.
I'm sure there is an easy way to know hence the question.
It's kind of challenging to help with some suggestions when you cast the question with what you are not looking for, rather than some aspect that you would like to see :)

The disk usage analysers that I'm familiar with such as those here:
basically provide the information that the command: du, provides but in a GUI form.

What is regarded as "easy" depends on individual views of course, but when one is working with machines that don't have a GUI installed, or lack a relevant disk analyser GUI app, then the du command in the terminal is the usual means of determining disk usage. For example:
Code:
[tom@sid ~]$ du -hx ~ | sort -hr | head
17G     /home/tom
4.2G    /home/tom/lemon
4.1G    /home/tom/browsers
2.2G    /home/tom/lemon/b0
1.9G    /home/tom/lemon/linxFirmw/linux-firmware
1.9G    /home/tom/lemon/linxFirmw
1.7G    /home/tom/sundry/ufn
1.7G    /home/tom/sundry
1.7G    /home/tom/src/kernel
1.7G    /home/tom/src
The options are: -h for human readable output, -x to restrict the read to one filesystem (no mounted filesystems included), ~ is the home directory to look in, then the result is piped into the sort command which is optioned to provide the output in human readable measures (h) and in reverse listing from greatest to least (r), and finally those results are piped though the head command which restricts the results to the top 10 lines of output.

To include the time of last modification, one can run the command with the time option:
Code:
[tom@sid ~]$ du --time -hx ~ | sort -hr | head
17G     2024-07-15 10:12        /home/tom
4.2G    2024-07-14 18:04        /home/tom/lemon
4.1G    2024-07-15 08:24        /home/tom/browsers
2.2G    2024-07-02 14:57        /home/tom/lemon/b0
1.9G    2024-01-29 18:54        /home/tom/lemon/linxFirmw/linux-firmware
1.9G    2024-01-29 18:54        /home/tom/lemon/linxFirmw
1.7G    2024-07-15 08:59        /home/tom/src/kernel
1.7G    2024-07-15 08:59        /home/tom/src
1.7G    2024-06-17 10:50        /home/tom/sundry
1.7G    2024-06-02 16:34        /home/tom/sundry/ufn

Another example: to find the disk usage that the firefox browser makes use of in one's home directory, one could run:
Code:
[tom@sid ~]$ du -sh .mozilla/firefox/
501M    .mozilla/firefox/

In any distro using apt, you can determine the installed size of any application thus:
Code:
[tom@sid ~]$ apt-cache show firefox-esr | grep Installed-Size
Installed-Size: 229092
where the output is a measure in kilobytes.

The question arises as to what more one might want in relation to disk usage? If the GUI is installed and provides the same info, why would one bother with terminal commands? Over to you :)
Welcome!
 
Last edited:
I can highly recommand "ncdu"! it shows you what folder uses how much space and you can navigate, to subfolders, to see, what subfolders use
Bildschirmfoto vom 2024-07-15 06-20-29.png
 
Welcome to the Forum.
1721021389841.gif


This is something I've never worried about. As long as you have at least 20% of free space you're good...I have a 500GB SSD which never gets beyond 50% full.

In Linux Mint we have...Disks...Disk Usage Analyser and System Monitor which gives you all the information you need.
1721023233283.gif
 
My way of the highway :)

Code:
du -sm --exclude=proc --exclude=dev --exclude=sys /* | sort -n
# du -sm --exclude=proc --exclude=dev --exclude=sys /* => count sizes in rootfs (in MByte) but exclude /proc /dev /sys
# sort -n => sort it by nummeric value
 

Members online


Latest posts

Top