LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-13-2023, 10:13 PM   #1
Thrazos
LQ Newbie
 
Registered: Jan 2023
Location: Colombia
Distribution: Slackware 15.0
Posts: 15

Rep: Reputation: 0
/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.
 
Old 01-13-2023, 10:18 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,329
Blog Entries: 28

Rep: Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144
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.

Last edited by frankbell; 01-13-2023 at 10:21 PM.
 
Old 01-13-2023, 10:33 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,130

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
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 ...
 
Old 01-13-2023, 11:46 PM   #4
Thrazos
LQ Newbie
 
Registered: Jan 2023
Location: Colombia
Distribution: Slackware 15.0
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by frankbell View Post
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
 
Old 01-14-2023, 02:09 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,876

Rep: Reputation: 7315Reputation: 7315Reputation: 7315Reputation: 7315Reputation: 7315Reputation: 7315Reputation: 7315Reputation: 7315Reputation: 7315Reputation: 7315Reputation: 7315
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.
 
Old 01-14-2023, 03:40 AM   #6
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,799

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
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.

Last edited by MadeInGermany; 01-14-2023 at 05:20 AM.
 
Old 01-14-2023, 03:52 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,130

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
That is not relevant to what the OP is asking, and will only lead to more confusion.
 
Old 01-14-2023, 04:43 AM   #8
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,799

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
Because the name /home differs from testdir?
 
Old 01-14-2023, 05:05 AM   #9
Thrazos
LQ Newbie
 
Registered: Jan 2023
Location: Colombia
Distribution: Slackware 15.0
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pan64 View Post
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.
 
Old 01-14-2023, 05:18 AM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,130

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Quote:
Originally Posted by MadeInGermany View Post
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.
 
Old 01-14-2023, 05:37 AM   #11
Thrazos
LQ Newbie
 
Registered: Jan 2023
Location: Colombia
Distribution: Slackware 15.0
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by syg00 View Post
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?
 
Old 01-14-2023, 05:52 AM   #12
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,587
Blog Entries: 19

Rep: Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455Reputation: 4455
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.
 
Old 01-14-2023, 06:26 AM   #13
Thrazos
LQ Newbie
 
Registered: Jan 2023
Location: Colombia
Distribution: Slackware 15.0
Posts: 15

Original Poster
Rep: Reputation: 0
[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!!!
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20230114_071910-1.png
Views:	21
Size:	46.1 KB
ID:	40231  

Last edited by Thrazos; 01-14-2023 at 06:27 AM.
 
Old 01-14-2023, 10:14 AM   #14
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
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.
 
Old 01-14-2023, 10:36 AM   #15
elgrandeperro
Member
 
Registered: Apr 2021
Posts: 415
Blog Entries: 2

Rep: Reputation: Disabled
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.

Last edited by elgrandeperro; 01-14-2023 at 01:19 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] F27 - Empty Trash Bin icon is showing the non-empty icon Connor84 Fedora 2 02-17-2018 01:18 AM
LXer: How To Empty a File, Delete N Lines From a File, Remove Matching String From a File, And Remove Empty/Blank Lines From a File In Linux LXer Syndicated Linux News 0 11-22-2017 12:30 PM
Scripting Help--Check empty string condition (not null, but empty!) sungchoiok Linux - Newbie 4 01-01-2012 03:46 PM
[SOLVED] [BASH] non-empty variable before loop end, is empty after exiting loop aitor Programming 2 08-26-2010 09:57 AM
Gentoo VNC, empty dialog box !! "Question" window is empty ! TheHushedCaskeT Linux - Software 0 02-01-2005 10:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration