Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Apr 2003 11:07:32 +0300 (EEST)
From:      Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
To:        Mark <admin@asarian-host.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: 'chflags' on a symbolic link file?
Message-ID:  <200304090807.h3987W9Z000661@pm514-9.comsys.ntu-kpi.kiev.ua>
In-Reply-To: <200304090606.H3966MPM062388@asarian-host.net.lucky.freebsd.questions>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 9 Apr 2003 06:07:13 +0000 (UTC) in lucky.freebsd.questions, Mark wrote:
> Hello again,
> 
> Perhaps a dumb question, but can I do a 'chflags' on a symbolic link file?
> (FreeBSD 4.7R). Not the destination of the link, but the actual link file
> itself. The reason I ask, is that I want to prevent a symbolic link from
> being deleted.
> 

Read last paragraph from the chflags(1) manual page, it answers
your question:

     Symbolic links do not have flags, so unless the -H or -L option is set,
     chflags on a symbolic link always succeeds and has no effect.  The -H, -L
     and -P options are ignored unless the -R option is specified.  In addi-
     tion, these options override each other and the command's actions are
     determined by the last one specified.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304090807.h3987W9Z000661>