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