Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi: I have the root partition 97% full. But when I installed the O.S. it took much less space. So I want to delete/transfer some files. The question is what files? I would use du to see the directory that is taking a significant part of the disk. But in what way? I cannot begin
Code:
du -hs /
Actually I would begin by determining which files take more than 1 GB. But how do I do this?
I could do
Code:
ls -lR
and have a script that tells me when the file takes more than 1GB. Of course the script would have to scan the output of ls. Is there a simple way to achieve this?
Once you know which mount point is using the most space you can move to that directory and figure out what is using so much space.
You will notice that my root partition is separate from the other partitions in the Mounted On column. You claim that root is almost full, 97%, but you are looking at your home directory above. If home and root are mounted separately then clearing the Trash folder is not going to help you with your root being full.
Go back and use the df command on the root level to see what is being used where.
I have everything (the OS) mounted on a single point. In Trash I found a lot of movies, which take a lot of space. I proceeded to deleted Trash and now df gives 64% full instead of 97%. This leaves me with
Code:
root@darkstar/# du -h -d1
7.0M ./etc
12K ./srv
du: cannot access './proc/3745/task/3745/fd/4': No such file or directory
du: cannot access './proc/3745/task/3745/fdinfo/4': No such file or directory
du: cannot access './proc/3745/fd/3': No such file or directory
du: cannot access './proc/3745/fdinfo/3': No such file or directory
0 ./proc
54M ./boot
792K ./run
4.0K ./opt
3.1G ./usr
3.9G ./almacen
1.5G ./home
4.0K ./juan
4.0K ./mnt
4.0K ./debian
0 ./sys
2.1G ./root
12K ./tmp
0 ./dev
16K ./lost+found
4.0K ./pasaje
2.2G ./var
13G .
root@darkstar/#
Why 2.2G in /var? /almacen is a separate partition.
It is Arch Linux. Please notice I said the root partition is nearly full, not the root directory. Actually the problem can be stated in more general terms: partition part_foo is nearly full and I want to delete unnecesary files lying in that partition. Asuming part_foo is mounted in directory /dir_foo, how to discover files under /dir_foo that occupy more than 1 GB? This won't be answered by df, but either du or ls look like ideal tools for the job. And how to automate the procedure.
A question: Do you call / the root directory?
Arch does not have an installer. You yourself do all things an installer normally does. The first thing you do after given a prompt by the iso image is to run wifi-menu in order to get connected to the web. Then
where /dev/mmcblk01 is the root partition, followed by other stuff. However in the Arch circles they speak about the installer, a thing I don't understand.
I know who is the one that placed those audio and video files in .../Trash. It is Transmission, a program to manipulate torrents. Maybe I choose 'Remove torrent and delete files'. And judging by the result he puts everything in .local/.../Trash.
One procedure to follow when df says / is nearly full if to erase all hidden files in the home directory and run df again to see the result, it seems.
A further question: I did 'rm -r ~/.local/share/Trash'. Will the Trash directory get regenerated again? I mean, perhaps I should have done 'rm -r ~/.local/share/Trash/*'.
/var is where all of the logfiles (and i.e. printer temporary files) go to.
Look again at /var/log and /var/spool, those are the most likely ones.
A command like
Code:
du -sm /var/*|sort -n
as root (there are a lot of dirs that are non-visible to normal users) will give you an idea of where the most diskspace is used.
It is Arch Linux. Please notice I said the root partition is nearly full, not the root directory.
Yes, sorry.
Quote:
Asuming part_foo is mounted in directory /dir_foo, how to discover files under /dir_foo that occupy more than 1 GB? This won't be answered by df, but either du or ls look like ideal tools for the job. And how to automate the procedure.
Via scripting.
Quote:
A question: Do you call / the root directory?
No '/' is root but '/root' is the root directory.
Quote:
Arch does not have an installer. You yourself do all things an installer normally does. The first thing you do after given a prompt by the iso image is to run wifi-menu in order to get connected to the web. Then
where /dev/mmcblk01 is the root partition, followed by other stuff.
Seems a bit backwards. I'd think the first thing any installation would have you do is partition the drive. It is here where you should make a root partition and at least a home partition.
Quote:
However in the Arch circles they speak about the installer, a thing I don't understand.
I know who is the one that placed those audio and video files in .../Trash. It is Transmission, a program to manipulate torrents. Maybe I choose 'Remove torrent and delete files'. And judging by the result he puts everything in .local/.../Trash.
One procedure to follow when df says / is nearly full if to erase all hidden files in the home directory and run df again to see the result, it seems.
A further question: I did 'rm -r ~/.local/share/Trash'. Will the Trash directory get regenerated again? I mean, perhaps I should have done 'rm -r ~/.local/share/Trash/*'.
I'd go with the second one to delete the files and leave the directory.
So we have three roots. The tree vertex, the root directory and a user called root. Thanks lazydog for your kind replies.
To get the terminology right:
Code:
/ is the root _directory_ of the whole tree of a Linux system
/root is the home directory of the user "root"
and the one you were concerned about is the partition that has
been mounted on the / dir (and shown by df as /)
/dev/sda1 11160720 7945872 3101460 72% /
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.