Daemon News Ezine BSD News BSD Mall BSD Support Forum BSD Advocacy BSD Updates

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

Re: Why does ls report wrong creation date on symlinks?



>>I just discovered that "ls -l" reports the creation date incorrectly
>>on symlinks.  It reports as the creation date of each symlink, the

>It's the intended behavior. The idea is that symlinks aren't necessarily files
>and therefore should not have their own file permissions/dates/etc...but
>instead should take on those attributes from the file that the symlink points
>to if it exists.
m
Actually they only take attributes from the file pointed to in contexts
where they are pointers.  In other contexts (e.g., for lstat() and ls),
the attributes have to be taken from somewhere else.  In BSD-4.4, there
are no longer any relevant attributes in the inode of the symlink and
the attributes of the parent directory are used instead.  See
`man 7 symlink'.

Bruce