[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: broken system after srm -r -d /tmp/.* (user login and several services not working)



Jonas Meurer:
> 
> But I discovered something really strange. If I compare the output of
> 'ls -al /' on my system and in the chroot, several directory sizes seem
> to be different. I thought that directorys always have a size of
> 4069 bytes, but apparently this is not the case:

No, it's not and your output is not unusual at all.

Directories contain references to all files and direcotries in them
(non-recursively). If these references don't fit into 4kB, it grows
automatically. Recently I have seen an directory which occupied more
than 1MB of disk space because it contained (IIRC) a few hundred
thousand files. /sys and /proc show a size of zero because they are
virtual filesystems and don't contain real files. If you mount your root
filesystem somewhere else, you'll probably see that the real directories
(which are shadowed by the virtual filesystems mounten on them) occupy
4kB as well.

(I won't comment on the strace since I could only guess what's wrong
with that.)

J.
-- 
My drug of choice is self-pity.
[Agree]   [Disagree]
                 <http://www.slowlydownward.com/NODATA/data_enter2.html>

Attachment: signature.asc
Description: Digital signature


Reply to: