Path: utzoo!attcan!uunet!know!zaphod.mps.ohio-state.edu!wuarchive!psuvax1!rutgers!mcnc!decvax.dec.com!zinn!siia!drd From: drd@siia.mv.com (David Dick) Newsgroups: comp.unix.programmer Subject: Re: File "type" Message-ID: <1990Sep27.144913.28446@siia.mv.com> Date: 27 Sep 90 14:49:13 GMT References: <171@alchemy.UUCP> Organization: Software Innovations, Inc. Lines: 24 In <171@alchemy.UUCP> bbs@alchemy.UUCP (BBS Administration) writes: > Could someone explain how the command "file" works? Specifically, I am >writing a program that allows users to navigate their $HOME directory and >any subdirectories (they cannot leave their $HOME directory though, for >security reasons) to find files that are to be read into a text editor. >Some text editor forks this program, and when the user selects a file to >read, it writes the pathname to a temporary file which the editor reads >and then loads into its' buffer. [more description omitted] I consider file(1) to be a useful heuristic program for manual use, but I would never put it in a script for automatic use. In other words, it's just a guesser, and does not contribute to making a robust application. If you have particular requirements of a target file, you should establish them with your own code. David Dick Software Innovations, Inc.