I just found out something interesting about file attributes and broken symlinks. The file command can't read them at all.
file attributes symlinkfile -owner
It's interesting because it tries to go straight to the linked file even though I never told it to with readlink. It doesn't seem to care about
the symlink file.
That makes sense and I even find it convenient when trying to determine whether it's a directory, for example. It doesn't care about the link,
it just looks at the target and saves me an extra step.
But the user may want to delete the link because it's no longer valid,
it's a broken link, in which case it may be good to see who the owner
is.
When checking for mtime, the file command also gets the date and time
of the target, not the link. I happen to like that behavior better,
but I can't figure out how to obtain the information on the symlink file specifically in case I need it.
When was that symlink created (which is very likely the same date and
time as mtime)? It seems I can't extract that information with Tcl.
Is there a way?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 55:02:16 |
Calls: | 6,914 |
Calls today: | 4 |
Files: | 12,379 |
Messages: | 5,430,461 |