1

When I ls -ltr on this directory, it has nothing in it, however if I check for hidden files the "." has 2 gigs in it and the parent has 9 mgs.

So what I have been doing is deleting the directory and recreating a new one. However, I don't know what is causing this.

casperrd@usaHOST02 1016$ ls -ltra /come/and/playwithus/danny/quarantine
total 2380
drwxr-xr-x 2 casperrd casper 2330624 Jul 11  2016 .
drwxr-xr-x 4 casperrd casper   90112 Oct 20 05:36 ..
casperrd@usaHOST02 1017$
1
  • This comment, notwithstanding the closing query, should be an answer.
    – DopeGhoti
    Nov 1, 2017 at 21:48

2 Answers 2

2

As Mark Plotnick and A.B mention in their comments, metadata is information stored in the directory listing about the number of files, their names and inode numbers. This sort of information is cumulative and builds up over time if the directory hold a large number of files or other directories. The storage used is fairly minimal, considering today;'s gargantuan disks and is usually in the 4Kbyte - 4Mbyte range in normal operation. Busy directories will have more as is noted in the question. Some good links to learn more about the Linux filesystem organization include:

http://www.linfo.org/metadata.html

0

Well, in linux, "." is a shortcut meaning "this directory," and ".." is a shortcut for "the parent to this directory."

I think you're seeing 2.33MB in this directory, as well as a 90KB parent directory.

Don't worry about it, it's confused more than one person. (Same reason your shouldn't do DOS-style wildcards (e.g., delete *.*, because that matches them both)!

Good luck!

5
  • 2
    This does not answer the question about those 2 Gb.
    – Kusalananda
    Nov 1, 2017 at 20:16
  • 1
    I still don't think it answers the question. Where is that space being used? He knows he is seeing space in the current directory, he is asking where is it?
    – jesse_b
    Nov 1, 2017 at 20:58
  • It's not 2 GB, it's 2 MB and it's where it's always been: on the disk as directory and file meta-information. See linfo.org/metadata.html and cyberciti.biz/tips/… for discussions on what that's like...
    – Thomas N
    Nov 1, 2017 at 22:06
  • @ThomasN, if you have the answer feel free to post it as an answer.
    – jesse_b
    Nov 1, 2017 at 22:15
  • 1
    2 comments: 1/ no, *.* doesn't match a file beginning with . so not . nor .., can be tested safely with echo *.* which won't show . or .. . 2/ about the unusual size of ., I guess that means this directory used to have a great number of files in the past, forcing it to enlarge its size. This kind of size is never reclaimed. One has to rmdir the directory and create a new. A freshly created directory usually uses only 4k for ext4. It depends on the filesystem and perhaps other settings
    – A.B
    Nov 1, 2017 at 22:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .