bug-tar
[Top][All Lists]
Advanced

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

Re: extracting milions of symlinks


From: Sergey Poznyakoff
Subject: Re: extracting milions of symlinks
Date: Mon, 02 Dec 2019 16:47:05 +0200

Ondrej Dubaj <address@hidden> ha escrit:

> Hello,
> I would like to ask about behaviour of tar when extracting millions of
> symlink.

When extracting a symlink to absolute file name or to a filename in a
parent directory, tar first creates a placeholder (a regular file of
zero length) in its place and records the fact in a list of such
"delayed links".  The placeholder is replaced with the actual link when
it becomes certain that it cannot be used for placing other file to
the absolute location unbeknownst to the user.  Quite often this becomes
certain only at the end of extraction.  The delayed list link is kept
in the memory, and that's the reason for the excessive memory usage you
observe.

> Is it expected behaviour?

Yes, it is expected behaviour.

> Is there a way that the memory can be freed also during extraction in case
> it is not needed anymore?

Delayed link creation is disabled if the -P (--absolute-names) option is
used.

Regards,
Sergey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]