LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /home partition 1% and is empty (https://www.linuxquestions.org/questions/linux-newbie-8/home-partition-1-and-is-empty-4175720876/)

Thrazos 01-13-2023 10:13 PM

/home partition 1% and is empty
 
Good night fellas i recently installed Slackware, i created 3 partitions sda1 /root, sda2 swap and sda3 /Home, the question is, why /Home says 1% used if is empty, i don't have any pic, video or file.

frankbell 01-13-2023 10:18 PM

While in your home directory, try running this command from a terminal:

Code:

ls -a
I suspect you will find a number of "hidden" dot-config files present that will account for that minimal amount of disk usage. Follow the link to learn more about hidden files on Linux.

And welcome to LQ.

syg00 01-13-2023 10:33 PM

The fact that you have a home directory at all proves /home isn't empty. But most of that usage will be for the filesystem itself. Depending on filesystem choices metadata and maybe also a reserved percentage. Windows doesn't tell you of such things ...

Thrazos 01-13-2023 11:46 PM

Quote:

Originally Posted by frankbell (Post 6404255)
While in your home directory, try running this command from a terminal:

Code:

ls -a
I suspect you will find a number of "hidden" dot-config files present that will account for that minimal amount of disk usage. Follow the link to learn more about hidden files on Linux.

And welcome to LQ.

Ok maybe checking hidden files inside /home can see what is. I hope that files don't belongs to the SO, and the complete installation had been inside the root dir

pan64 01-14-2023 02:09 AM

users always have some files in their homes, usually hidden files, started with dot (like .bashrc). These files belong to the user and were created when the user itself was created. The installation contains the tools to generate these files and which are usually located on the root filesystem.

MadeInGermany 01-14-2023 03:40 AM

A directory uses one or more data blocks.
The following exercise will blow up the directory size by creating many files in it.
Code:

mkdir testdir
cd testdir
ls -ld
for f in file{1..20000}; do : > "$f"; done
ls -ld
find . -name "file?*" -delete
ls -ld

Most file systems won't shrink the directory when files are deleted.

syg00 01-14-2023 03:52 AM

That is not relevant to what the OP is asking, and will only lead to more confusion.

MadeInGermany 01-14-2023 04:43 AM

Because the name /home differs from testdir?

Thrazos 01-14-2023 05:05 AM

Quote:

Originally Posted by pan64 (Post 6404276)
users always have some files in their homes, usually hidden files, started with dot (like .bashrc). These files belong to the user and were created when the user itself was created. The installation contains the tools to generate these files and which are usually located on the root filesystem.

Thnx for ask, i made this question cause when installing Slackware and ask me to select another partition which was created for me like /dev/sda3 that i would use like /Home, setup told me if i wanted to use that partition to distribute SO files, so i thought the installation program would install part of the SO inside home directory, sorry if is a stupid question but i'm new on Linux, and there are no stupid questions, just stupid that don't ask.

syg00 01-14-2023 05:18 AM

Quote:

Originally Posted by MadeInGermany (Post 6404290)
Because the name /home differs from testdir?

No, because the OP has just installed and is wondering why a newly formatted filesystem is 1% occupied.

Thrazos 01-14-2023 05:37 AM

Quote:

Originally Posted by syg00 (Post 6404294)
No, because the OP has just installed and is wondering why a newly formatted filesystem is 1% occupied.

Exactly, i'm wondering that. When check the directory says for example 30 GB total used 1% and available 28 GB and why this happens?

hazel 01-14-2023 05:52 AM

Your home directory is for your personal files. This includes personal configuration files for various programs that you use, but they typically don't take up much room. What takes up room is photographs, videos, music and all that other stuff that people commonly download from the internet or upload from other devices. And you won't have those on a freshly installed system.

Check your home directory in six months time and you'll get a more typical picture.

Thrazos 01-14-2023 06:26 AM

1 Attachment(s)
[QUOTE=hazel;6404304]Your home directory is for your personal files. This includes personal configuration files for various programs that you use, but they typically don't take up much room. What takes up room is photographs, videos, music and all that other stuff that people commonly download from the internet or upload from other devices. And you won't have those on a freshly installed system.

Check your home directory in six months time and you'll get a more typical picture.[/QUOTE


guys, please watch the attached file...

as you can see 1.3 GB used??? this is insane!!!

computersavvy 01-14-2023 10:14 AM

Have you even tried what was suggested?
Code:

ls -la /home/*
will give you info about what is there.
Code:

du -hs .??* *
will tell you exactly what is being used in each file and directory located in the current location. Run that in your home directory to see what is actually there.

elgrandeperro 01-14-2023 10:36 AM

It probably isn't files, it is inodes. Inodes take up some space, and you need an initial tree that is created by mkfs. I am not sure if it is just one for lost+found or the fully allocated tree (you specify how many inodes/blocks and that is reserved). But df is probably rounding up, so it is %1.

I actually created a loopback filesystem, removed lost+found and it still have a few kbs used, perhaps for the directory tree. It still listed it as %1 used.


All times are GMT -5. The time now is 03:20 AM.