From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wb2flw.octothorp.org([63.224.68.2]) (2390 bytes) by braille.uwo.ca via smail with P:esmtp/D:aliases/T:pipe (sender: ) id for ; Tue, 29 Aug 2000 22:51:49 -0400 (EDT) (Smail-3.2.0.102 1998-Aug-2 #2 built 1999-Sep-5) Received: from localhost (wacker@localhost) by wb2flw.octothorp.org (8.9.3/8.9.3) with ESMTP id CAA04060 for ; Wed, 30 Aug 2000 02:51:52 GMT X-Authentication-Warning: wb2flw.octothorp.org: wacker owned process doing -bs Date: Tue, 29 Aug 2000 20:51:52 -0600 (MDT) From: "William F. Acker WB2FLW +1-303-777-8123" To: speakup@braille.uwo.ca Subject: Re: Stupid kernel question In-Reply-To: <20000830110906.A4728@gotss.eu.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII List-Id: Actually, when you use the greater-than symbol and a filename, the shell just creates the file if it doesn't exist and send standard output to it. If the file exists, the permissions of the *target* file are kept as they were regardless of the current umask, as you said. when the shell creates the new file, it has no way to preserve the permissions of the source file because it has no idea where the cat command is getting its input. So the permissions of the target are derived from the current umask of the invoking process. If you want to preserve the permissions of the original, use the -p flag of cp. HTH. Bill in Denver On Wed, 30 Aug 2000, Kerry Hoath wrote: > They probably use cat because you can use that to put the kernel ona file; > a block device etc. Also catting a file >another file preserves the > permitions of the original whereas cp doesn't usually. It also means that > if you cat >another file and the file exists; your umask won't come into play. > Those are my ideas on the issue but nothing wrong with cp. > On Tue, Aug 29, 2000 at 04:13:25PM -0400, Kirk Reiser wrote: > > No reason I can think of. I use cp all the time and would recommend > > it. Maybe they don't know there's a copy command under linux!? 'grin' > > > > Kirk > > > > -- > > > > Kirk Reiser The Computer Braille Facility > > e-mail: kirk@braille.uwo.ca University of Western Ontario > > phone: (519) 661-3061 > > > > _______________________________________________ > > Speakup mailing list > > Speakup@braille.uwo.ca > > http://speech.braille.uwo.ca/mailman/listinfo/speakup > > > >