From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,32c594a83e2d8db X-Google-Attributes: gidf7344,public X-Google-Thread: 114b0c,32c594a83e2d8db X-Google-Attributes: gid114b0c,public X-Google-Thread: 1164f8,32c594a83e2d8db X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-10-14 02:06:06 PST Xref: gmd.de comp.os.vms:32625 comp.sys.dec:10875 comp.sys.hp:26209 Newsgroups: comp.os.vms,comp.sys.dec,comp.sys.hp Path: gmd.de!xlink.net!howland.reston.ans.net!vixen.cso.uiuc.edu!sdd.hp.com!swrinde!menudo.uh.edu!uuneo!sugar!jabberwock!daniels From: daniels@biles.com (Brad Daniels) Subject: Re: Move from VMS to Open VMS or to HP-UX? Advice sought! References: <1993Sep23.161016.12926@vms.eurokom.ie> <29h23uINNfr1@gap.caltech.edu> <1993Oct13.170157.121316@embl-heidelberg.de> <1993Oct13.180624.23099@dxcern.cern.ch> Organization: Biles and Associates Date: Wed, 13 Oct 1993 21:15:38 GMT Message-ID: In article <1993Oct13.180624.23099@dxcern.cern.ch>, Dan Pop wrote: >In <1993Oct13.170157.121316@embl-heidelberg.de> omond@embl-heidelberg.de (Roy Omond) writes: > >>Not only that, Carl, but in the case where it doesn't hit the "arg list too >>long" bug, it causes each file to be "touched" which makes a nonsense of any >>attempt to track usage of files. Sheesh ... this whole thing is getting >>verrrrry silly. > >Are you sure (about wc)? > [ listing showing last modified times unchanged by wc deleted. ] I think what Roy meant was not that the files would be touched in the sense of the utility "touch" (which usually changes last modified times), but that the files' last accessed times would be changed. Try the same example, but use "ls -lu" instead of "ls -l", and you'll see the times change. The *real* way to get the equivalent of the VMS functionality is to simply do either "ls -l | head -1" or "ls -lR {dir} | head -1" to get the total disk blocks used. Unfortunately, this method only works when listing directories (you can use the "-s" option instead of "-l" if you want.) To get a grand total of file sizes without modifying last accessed times, you need to do something like: "ls -s1 {files} | awk '{sum += $1;} END {print sum}'" This is a bit clunky, but not too horrendous, especially if you hide it behind an alias. This operation should be easier to achieve on UNIX, and the fact that it isn't points up a small hole in the coverage of the "ls" command. However, the fact that the missing feature can be compensated for so easily shows one of UNIX's major strengths. A similar feature "hole" on VMS will often require serious programming to plug. - Brad -- ---------------------------------------------------------------------- + Brad Daniels | "Let others praise ancient times; + + Biles and Associates | I am glad I was born in these." + + These are my views, not B&A's | - Ovid(43 B.C - 17 A.D) +