Massive /tmp files
@lbutlr
kremels at kreme.com
Fri Jan 22 20:05:38 EET 2021
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.
More information about the dovecot
mailing list