Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rutgers!cmcl2!esquire!baumgart From: baumgart@esquire.dpw.com (Steve Baumgarten) Newsgroups: comp.sys.mac Subject: Re: System 7 question Summary: Use DiskTop for a complex "find" Keywords: Unix, DiskTop Message-ID: <1700@esquire.UUCP> Date: 2 Jan 90 17:33:22 GMT References: <10734@claris.com> <780093@hpvcfs1.HP.COM> Sender: news@esquire.UUCP Reply-To: baumgart@esquire.dpw.com (Steve Baumgarten) Organization: Davis Polk & Wardwell Lines: 58 In-reply-to: mikek@hpvcfs1.HP.COM (Mike Kirkpatrick) In article <780093@hpvcfs1.HP.COM>, mikek@hpvcfs1 (Mike Kirkpatrick) writes: >How about pipes and i/o redirection for starters. There are some activities >that are just better done with a text/command line interface. The power to >set in motion a chain of commands. Multi-directory i/o operations(especially >disjoint directories) are much easier done with a command line. For example, >how would you do this under macOS (send a list of all files under current >directory to the spooled printer)? > > find . -print | lp I disagree. Just because something has been done in a certain way for a long time doesn't mean that it's the "best" way to do it. Unix utilities are a case in point. Unix has been around for a while, and the command-line interface has had time to mature. Graphical user interfaces are relatively new, and were originally designed to be user-centered, rather than program-centered or I/O-stream-centered. Thus, I/O redirection on the Mac is difficult *now*. Likewise, Unix deals best with standard input and output streams, because that's what it was designed to do. In any case, a command-line for the Mac is most definitely not the answer. No one on earth can remember all the options to the various utilities (hence the existence of the "man" command under Unix); at least the Commando interface under MPW is a step in the right direction. But getting back to the case at hand, try DiskTop. The new version can do a complex find and then let you operate on the result. For example, I can easily have DiskTop find all the files that end in ".c", and then save the result to a file, print the file list, or copy all but one of the files to a subdirectory, regardless of which directories they reside in. To do that with "find", you'd have to do something bizarre like: find /source -name \*.c -print > cfiles { edit "cfiles" to remove the one file you *don't* want to copy } cp `cat cfiles` subdir Rather less than intuitive. My mother is certainly never going to learn how to do it, and why should she? But she'd have no problem filling in the DiskTop "find" dialog, including setting things up to find all files that haven't been modified in a week. Let's see, under Unix that would be: find / -mtime +7 -print Or is it: find / -mtime -7 -print Better go have a look at the man page... -- Steve Baumgarten | "New York... when civilization falls apart, Davis Polk & Wardwell | remember, we were way ahead of you." baumgart@esquire.dpw.com | cmcl2!esquire!baumgart | - David Letterman