Article View: comp.unix.shell
Article #1108Re: How to do <cmd> file | hold file
From: Neil Rickert
Date: Sun, 09 Sep 1990 14:00
Date: Sun, 09 Sep 1990 14:00
15 lines
1346 bytes
1346 bytes
In article <8029:Sep903:04:5390@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >(I think cp foo bar should work like ( rm -f bar; cat > bar ) < foo, so >that other links to bar won't be affected; but POSIX 1003.2 apparently >disagrees and has cp foo bar work like cat < foo > bar. Oh, well.) > Please don't ever implement 'cp' in the way you suggest. Doing so would change file ownership, group, and permissions, not to mention that it would fail if the file is in directory for which you do not have write permission. It also messes up multiple links and symbolic links to the file. -- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= Neil W. Rickert, Computer Science <rickert@cs.niu.edu> Northern Illinois Univ. DeKalb, IL 60115. +1-815-753-6940
Technical Details
Message-ID:
<1990Sep9.140057.15833@mp.cs.niu.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!ux1.cso.uiuc.edu!mp.cs.niu.edu!rickertReferences:
<2274@ns-mx.uiowa.edu> <1215@tardis.Tymnet.COM> <8029:Sep903:04:5390@kramden.acf.nyu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!ux1.cso.uiuc.edu!mp.cs.niu.edu!rickert From: rickert@mp.cs.niu.edu (Neil Rickert) Newsgroups: comp.unix.shell Subject: Re: How to do <cmd> file | hold file Message-ID: <1990Sep9.140057.15833@mp.cs.niu.edu> Date: 9 Sep 90 14:00:57 GMT References: <2274@ns-mx.uiowa.edu> <1215@tardis.Tymnet.COM> <8029:Sep903:04:5390@kramden.acf.nyu.edu> Organization: Northern Illinois University Lines: 15