home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!wupost!gumby!destroyer!mudos!mju
- From: mju@mudos.ann-arbor.mi.us (Marc Unangst)
- Subject: Re: Octal chmod status
- Message-ID: <Bt7t36.1w3@mudos.ann-arbor.mi.us>
- Date: Wed, 19 Aug 1992 05:11:29 GMT
- References: <22411@sybase.sybase.com> <Bt0EEL.H1q@mudos.ann-arbor.mi.us> <1992Aug18.181609.8988@news.eng.convex.com>
- Organization: The Programmer's Pit Stop, Ann Arbor MI
- Lines: 28
-
- In article <1992Aug18.181609.8988@news.eng.convex.com> tchrist@convex.COM (Tom Christiansen) writes:
- >You might, and people might even use it if they want to lug
- >another huge a.out and overly large and misplaceable foo.c
- >around with them wherever they go. I'd just use this:
- >
- > perl -e 'printf("%04o\n", (stat($ARGV[0]))[2] & 07777)'
-
- Hmm. Huge a.out, huh? Overly large foo.c, huh? Hmm.
-
- mju@mudos:~$ ls -l getperms getperms.c
- -rwxr-xr-x 1 mju group 4780 Aug 19 01:06 getperms
- -rw-r--r-- 1 mju group 445 Aug 15 01:08 getperms.c
- mju@mudos:~$ cd /usr/local/bin
- mju@mudos:/usr/local/bin$ ls -l perl*
- lrwxrwxrwx 1 root other 9 Aug 19 01:07 perl -> perl4.019
- -rwxr-xr-x 1 bin bin 283992 Aug 19 01:06 perl4.019
- mju@mudos:/usr/local/bin$ cd ../src
- mju@mudos:/usr/local/src$ ls -l perl-4.019.tar.Z
- -rw-r--r-- 1 mju mju 801616 Aug 10 13:04 perl-4.019.tar.Z
- mju@mudos:/usr/local/src$ exit
-
- Sure looks like my program is smaller. Could just be an optical
- illusion, though...
-
- --
- Marc Unangst | Real men don't make backups. Real men never
- mju@mudos.ann-arbor.mi.us | accidentally delete files that they're going
- | to need later.
-