On 22 Jan 2021, at 09:07, Ron Garret (gmail) <ron.garret at gmail.com> wrote:> On Jan 22, 2021, at 8:02 AM, @lbutlr <kremels at kreme.com> wrote: > >> On 21 Jan 2021, at 18:08, MRob <mrobti at insiberia.net> wrote: >>> Hello, >>> I just found user who has single folder (standard maildir format) that filled with over 8mil files and 800GB in the /tmp subdirectory of that folder: >> >> Are they real files or hard links? > > How would you distinguish a hard link from a ?real file??ls -l will show the number of hard links to a file in the first column after the permissions (or it showed the number off files (including . and ..) inside a directory if it's a directory entry). #v+ 10:58:53 ?:/ $ touch test.file 10:59:03 ?:/ $ ls -lsn total 0 0 -rw-r--r-- 1 502 0 0 Jan 22 10:59 test.file 10:59:09 ?:/ $ ln test.file mynewfile 10:59:19 ?:/ $ ls -lsn total 0 -rw-r--r-- 2 502 0 0 Jan 22 10:59 mynewfile -rw-r--r-- 2 502 0 0 Jan 22 10:59 test.file ^ number of hard links 11:04:18 ?:/ $ ls -lnd . drwxr-xr-x 4 502 0 128 Jan 22 10:59 /tmp/test/. ^ number of files #v- There are other ways, including the stat command. -- Rent a flat above a shop, cut your hair and get a job, smoke some fags and play some pool, pretend you never went to school and still you'll never get it right cuz when you're lay'n in bed at night watching roaches climb the wall if you called your dad he could stop it all.
On Jan 22, 2021, at 10:05 AM, @lbutlr <kremels at kreme.com> wrote:> On 22 Jan 2021, at 09:07, Ron Garret (gmail) <ron.garret at gmail.com> wrote: >> On Jan 22, 2021, at 8:02 AM, @lbutlr <kremels at kreme.com> wrote: >> >>> On 21 Jan 2021, at 18:08, MRob <mrobti at insiberia.net> wrote: >>>> Hello, >>>> I just found user who has single folder (standard maildir format) that filled with over 8mil files and 800GB in the /tmp subdirectory of that folder: >>> >>> Are they real files or hard links? >> >> How would you distinguish a hard link from a ?real file?? > > ls -l will show the number of hard links to a file in the first column after the permissions (or it showed the number off files (including . and ..) inside a directory if it's a directory entry).Ah, I misinterpreted the question then. You meant (I presume) ?Are they 8 million distinct files, or 8 million hard links to a (much) smaller number of actual underlying inodes.? So then my next question is (and I?m not intending to challenge you here, I?m just trying to get a better understanding of how dovecot works under the hood): where would these hard links come from? What does dovecot use hard links for? rg