From bradleyb@u.washington.edu Tue Aug 20 18:57:01 2002 Received: from mailscan1.cac.washington.edu (mailscan1.cac.washington.edu [140.142.32.16]) by lists.u.washington.edu (8.12.1+UW01.12/8.12.1+UW02.01) with SMTP id g7L1v0eY157932 for ; Tue, 20 Aug 2002 18:57:00 -0700 Received: FROM mxu1.u.washington.edu BY mailscan1.cac.washington.edu ; Tue Aug 20 18:57:00 2002 -0700 Received: from mxout1.cac.washington.edu (mxout1.cac.washington.edu [140.142.32.5]) by mxu1.u.washington.edu (8.12.1+UW01.12/8.12.1+UW02.06) with ESMTP id g7L1uxR9022025 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Tue, 20 Aug 2002 18:56:59 -0700 Received: from mailscan-out1.cac.washington.edu (mailscan-out1.cac.washington.edu [140.142.32.17]) by mxout1.cac.washington.edu (8.12.1+UW01.12/8.12.1+UW02.06) with SMTP id g7L1uxR6023005 for ; Tue, 20 Aug 2002 18:56:59 -0700 Received: FROM mailhost1.u.washington.edu BY mailscan-out1.cac.washington.edu ; Tue Aug 20 18:56:58 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 g7L1uwjC018734 for ; Tue, 20 Aug 2002 18:56:58 -0700 From: "Bradley Bell" To: Subject: RE: extracting file permissions Date: Tue, 20 Aug 2002 18:56:58 -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: <20020820170733.J2844@solenoid.ee.washington.edu> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 hmm, never used the stat command before... why not just: stat -c "%a" $1 | xargs printf '%04d\n' -brad > -----Original Message----- > From: LINUX-owner@u.washington.edu > [mailto:LINUX-owner@u.washington.edu]On Behalf Of > jheiss+linux@ee.washington.edu > Sent: Tuesday, August 20, 2002 5:08 PM > To: UW Linux Group > Subject: Re: extracting file permissions > > > > stat -t /tmp | awk '{print "0x" $4}' | awk --non-decimal-data > '{printf "%o", $1}' > > > On Tue, Aug 20, 2002 at 04:14:13PM -0700, Zanfur wrote: > > > > 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? > > > > .