Mailinglist Archive: opensuse (1420 mails)

< Previous Next >
Re: [opensuse] Symbolic link
On Sun, 12 Jan 2014 20:27:02 +0100
Bernhard Voelker wrote:

On 01/12/2014 04:20 PM, Carl Hartung wrote:
the links wouldn't function properly otherwise.

Off-question, maybe, but just FYI:
Per definition, symbolic links do not necessarily have
to "function", i.e. to be resolvable. A symbolic link
could hold any information you like (restricted by length,
and no binary NULL in there, of course).

For example, you can store the current uptime in a symlink:

$ ln -s "$(uptime)" my-uptime-in-a-symlink ls -ldog
my-uptime-in-a-symlink $ ls -ldog my-uptime-in-a-symlink
lrwxrwxrwx 1 67 Jan 12 20:25 my-uptime-in-a-symlink -> 20:25pm up
1 day 7:17, 9 users, load average: 0.25, 0.24, 0.19

Look at those permissions! <-- On Topic bit for the OP :-)

Your example _does_ leave a broken symbolic link cluttering up the
filesystem, Berny. "touch" is a lot less messy.
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups