home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / shell / 3523 < prev    next >
Encoding:
Text File  |  1992-08-18  |  1.6 KB  |  39 lines

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