Why is /home twice as big as expected?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I was checking my disk usage today, and ran the following commands (using sudo so I didn't get "permission denied")
$sudo du -hs /home
26G /home
$sudo ls -la /home
total 24
drwxr-xr-x 4 root root 4096 Dec 27 2017 .
drwxr-xr-x 25 root root 4096 Oct 1 17:39 ..
drwxrwxr-x 3 root root 4096 Dec 27 2017 .ecryptfs
drwx------ 53 paper paper 12288 Oct 6 14:38 paper`
$sudo du -hs /home/*
13G /paper
Why is my /home directory exactly twice the size of my user directory, which looks like the only thing in /home?
filesystems disk-usage
New contributor
add a comment |Â
up vote
1
down vote
favorite
I was checking my disk usage today, and ran the following commands (using sudo so I didn't get "permission denied")
$sudo du -hs /home
26G /home
$sudo ls -la /home
total 24
drwxr-xr-x 4 root root 4096 Dec 27 2017 .
drwxr-xr-x 25 root root 4096 Oct 1 17:39 ..
drwxrwxr-x 3 root root 4096 Dec 27 2017 .ecryptfs
drwx------ 53 paper paper 12288 Oct 6 14:38 paper`
$sudo du -hs /home/*
13G /paper
Why is my /home directory exactly twice the size of my user directory, which looks like the only thing in /home?
filesystems disk-usage
New contributor
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I was checking my disk usage today, and ran the following commands (using sudo so I didn't get "permission denied")
$sudo du -hs /home
26G /home
$sudo ls -la /home
total 24
drwxr-xr-x 4 root root 4096 Dec 27 2017 .
drwxr-xr-x 25 root root 4096 Oct 1 17:39 ..
drwxrwxr-x 3 root root 4096 Dec 27 2017 .ecryptfs
drwx------ 53 paper paper 12288 Oct 6 14:38 paper`
$sudo du -hs /home/*
13G /paper
Why is my /home directory exactly twice the size of my user directory, which looks like the only thing in /home?
filesystems disk-usage
New contributor
I was checking my disk usage today, and ran the following commands (using sudo so I didn't get "permission denied")
$sudo du -hs /home
26G /home
$sudo ls -la /home
total 24
drwxr-xr-x 4 root root 4096 Dec 27 2017 .
drwxr-xr-x 25 root root 4096 Oct 1 17:39 ..
drwxrwxr-x 3 root root 4096 Dec 27 2017 .ecryptfs
drwx------ 53 paper paper 12288 Oct 6 14:38 paper`
$sudo du -hs /home/*
13G /paper
Why is my /home directory exactly twice the size of my user directory, which looks like the only thing in /home?
filesystems disk-usage
filesystems disk-usage
New contributor
New contributor
New contributor
asked 27 mins ago
OnLinedPaper
61
61
New contributor
New contributor
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
4
down vote
Try executing shopt dotglob
in that same shell.
Chances are that dotglob
is off, which causes *
expansion (globbing) to not include files and directories the names of which begin with .
(including the special directory entries .
and ..
).
Thus, when you run du -hs /home
it counts everything in that directory, but du -hs /home/*
expands to only du -hs /home/paper
.
Since presumably /home/.ecryptfs
contains the encrypted data, it makes sense that it would be about the same size as the decrypted data. Therefore, the files effectively get counted twice, but only when you point du
at the parent directory.
If you shopt -s dotglob
to turn on the dotglob setting in that shell session, then run sudo du -hs /home/*
again, you will likely see that it shows as the same size as if you run sudo du -hs /home
.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
Try executing shopt dotglob
in that same shell.
Chances are that dotglob
is off, which causes *
expansion (globbing) to not include files and directories the names of which begin with .
(including the special directory entries .
and ..
).
Thus, when you run du -hs /home
it counts everything in that directory, but du -hs /home/*
expands to only du -hs /home/paper
.
Since presumably /home/.ecryptfs
contains the encrypted data, it makes sense that it would be about the same size as the decrypted data. Therefore, the files effectively get counted twice, but only when you point du
at the parent directory.
If you shopt -s dotglob
to turn on the dotglob setting in that shell session, then run sudo du -hs /home/*
again, you will likely see that it shows as the same size as if you run sudo du -hs /home
.
add a comment |Â
up vote
4
down vote
Try executing shopt dotglob
in that same shell.
Chances are that dotglob
is off, which causes *
expansion (globbing) to not include files and directories the names of which begin with .
(including the special directory entries .
and ..
).
Thus, when you run du -hs /home
it counts everything in that directory, but du -hs /home/*
expands to only du -hs /home/paper
.
Since presumably /home/.ecryptfs
contains the encrypted data, it makes sense that it would be about the same size as the decrypted data. Therefore, the files effectively get counted twice, but only when you point du
at the parent directory.
If you shopt -s dotglob
to turn on the dotglob setting in that shell session, then run sudo du -hs /home/*
again, you will likely see that it shows as the same size as if you run sudo du -hs /home
.
add a comment |Â
up vote
4
down vote
up vote
4
down vote
Try executing shopt dotglob
in that same shell.
Chances are that dotglob
is off, which causes *
expansion (globbing) to not include files and directories the names of which begin with .
(including the special directory entries .
and ..
).
Thus, when you run du -hs /home
it counts everything in that directory, but du -hs /home/*
expands to only du -hs /home/paper
.
Since presumably /home/.ecryptfs
contains the encrypted data, it makes sense that it would be about the same size as the decrypted data. Therefore, the files effectively get counted twice, but only when you point du
at the parent directory.
If you shopt -s dotglob
to turn on the dotglob setting in that shell session, then run sudo du -hs /home/*
again, you will likely see that it shows as the same size as if you run sudo du -hs /home
.
Try executing shopt dotglob
in that same shell.
Chances are that dotglob
is off, which causes *
expansion (globbing) to not include files and directories the names of which begin with .
(including the special directory entries .
and ..
).
Thus, when you run du -hs /home
it counts everything in that directory, but du -hs /home/*
expands to only du -hs /home/paper
.
Since presumably /home/.ecryptfs
contains the encrypted data, it makes sense that it would be about the same size as the decrypted data. Therefore, the files effectively get counted twice, but only when you point du
at the parent directory.
If you shopt -s dotglob
to turn on the dotglob setting in that shell session, then run sudo du -hs /home/*
again, you will likely see that it shows as the same size as if you run sudo du -hs /home
.
answered 19 mins ago
Michael Kjörling
16k84698
16k84698
add a comment |Â
add a comment |Â
OnLinedPaper is a new contributor. Be nice, and check out our Code of Conduct.
OnLinedPaper is a new contributor. Be nice, and check out our Code of Conduct.
OnLinedPaper is a new contributor. Be nice, and check out our Code of Conduct.
OnLinedPaper is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f473678%2fwhy-is-home-twice-as-big-as-expected%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password