[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to overwrite a symbolic link?
From: |
Bob Proulx |
Subject: |
Re: How to overwrite a symbolic link? |
Date: |
Thu, 6 May 2010 16:26:32 -0600 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Pierre Gaston wrote:
> Peng Yu wrote:
> > Suppose that I have a symbolic link link1 pointing to file1. When I
> > write to link1, I don't want file1 change. I want it to remove the
> > link generated a new file and write to it.
> >
> > pipe '>' will change file 1. I'm wondering if there is way to do so,
> > so that I don't have to test whether it is a symbolic link or not
> > explicitly.
>
> rm link1
rm -f link1
The -f will prevent a stat(2) of the target before removal and will
prevent a warning if the target has already been removed or otherwise
does not exist.
Bob
Re: How to overwrite a symbolic link?, Marc Herbert, 2010/05/07
- Re: How to overwrite a symbolic link?, Peng Yu, 2010/05/07
- Re: How to overwrite a symbolic link?, Eric Blake, 2010/05/07
- Re: How to overwrite a symbolic link?, Peng Yu, 2010/05/07
- Re: How to overwrite a symbolic link?, Eric Blake, 2010/05/07
- Re: How to overwrite a symbolic link?, Peng Yu, 2010/05/09
- Re: How to overwrite a symbolic link?, Chet Ramey, 2010/05/09
Re: How to overwrite a symbolic link?, Marc Herbert, 2010/05/10
Re: How to overwrite a symbolic link?, Peng Yu, 2010/05/10
Re: How to overwrite a symbolic link?, Bob Proulx, 2010/05/10