help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Function to find symlink target


From: Emanuel Berg
Subject: Re: Function to find symlink target
Date: Sat, 28 May 2022 17:29:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Jean Louis wrote:

> Let us say there are 100 websites, there is repository of
> pictures, videos, files on computer, but one part must be on
> websites too, then there is website repository on a local
> computer. Images and files are then linked to website
> repository on local computer in their corresponding
> locations, this saving space, then rsync uploads symlinks as
> real files to web server.
>
> In this case symlinks spare huge hard disk space.

Actually a file (size F) and a symlink (size S and 0 < S)
takes F + S while just the file takes F.

How big is a symlink?

$ touch a.txt
$ ln -s a.txt a-sy.txt
$ du -b a-sl.txt
5

5 bytes. The path to a.txt.

The advantage is one can create virtual filesystems on
a file-by-file basis. There are many use cases for that
including the one you mention ...

> There is no general rule that one should tell to avoid some
> feature

The general rule is don't use it unless there is a good
reason to.

> rather there shall be particular case to consider to see
> what could be better solution.

Indeed.

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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