From bradleyb@u.washington.edu Tue Aug 20 16:36:54 2002 Received: from mailscan2.cac.washington.edu (mailscan2.cac.washington.edu [140.142.33.16]) by lists.u.washington.edu (8.12.1+UW01.12/8.12.1+UW02.01) with SMTP id g7KNaqeY157808 for ; Tue, 20 Aug 2002 16:36:52 -0700 Received: FROM mxu4.u.washington.edu BY mailscan2.cac.washington.edu ; Tue Aug 20 16:36:52 2002 -0700 Received: from mxout2.cac.washington.edu (mxout2.cac.washington.edu [140.142.33.4]) by mxu4.u.washington.edu (8.12.1+UW01.12/8.12.1+UW02.06) with ESMTP id g7KNaps9011703 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Tue, 20 Aug 2002 16:36:52 -0700 Received: from mailscan-out3.cac.washington.edu (mailscan-out3.cac.washington.edu [140.142.32.18]) by mxout2.cac.washington.edu (8.12.1+UW01.12/8.12.1+UW02.06) with SMTP id g7KNapej023002 for ; Tue, 20 Aug 2002 16:36:51 -0700 Received: FROM mailhost1.u.washington.edu BY mailscan-out3.cac.washington.edu ; Tue Aug 20 16:36:51 2002 -0700 Received: from musta (D-128-95-90-123.dhcp.washington.edu [128.95.90.123]) by mailhost1.u.washington.edu (8.12.1+UW01.12/8.12.1+UW02.06) with SMTP id g7KNaojC007221 for ; Tue, 20 Aug 2002 16:36:50 -0700 From: "Bradley Bell" To: Subject: RE: extracting file permissions Date: Tue, 20 Aug 2002 16:36:50 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <20020820161413.C6323@zanfur.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 here's a really kludgey way: chmod -v --reference= | awk '{print $6}' though if the object is just to copy permissions, you can use the --reference option directly, without ever needing to extract them. i.e. chmod --reference -brad > -----Original Message----- > From: LINUX-owner@u.washington.edu > [mailto:LINUX-owner@u.washington.edu]On Behalf Of Zanfur > Sent: Tuesday, August 20, 2002 4:14 PM > To: UW Linux Group > Subject: extracting file permissions > > > Howdy! > > I was wondering if anyone knew of a handy way (short of writing a > utility myself) that would extract the file permissions of a file on a > unix filesystem in numeric form? I need this for a script -- I'm trying > to copy permissions of a directory structure (and not the files) to > another, similar directory structure. Thanks! > > Cheers, > -robin > .