home *** CD-ROM | disk | FTP | other *** search
/ Mega CD-ROM 1 / megacd_rom_1.zip / megacd_rom_1 / GNUISH / FIND12.ZIP / README < prev    next >
Text File  |  1990-09-23  |  7KB  |  231 lines

  1. # readme. - GNUish MS-DOS find, v1.2
  2. # Copyright (C) 1990 by Thorsten Ohl, td12@ddagsi3.bitnet
  3.  
  4. This is GNU find for MS-DOS.  To recompile it, you also need the original
  5. GNU sources (Version 1.2, ftp'able from prep.ai.mit.edu) and the gnulib
  6. (available from the same place where you picked up this file).
  7.  
  8. GNU find is known to compile with Microsoft C 5.1 and 6.0.  Reports of
  9. successful compilation with other compilers are very much appreciated.
  10.  
  11.  
  12. Sorry, but there is no documentation available yet.  If you don't have
  13. the original source, here's the comment from the beginning of find.c:
  14.  
  15. /* Usage: find path... [expression]
  16.  
  17.    Predicates:
  18.  
  19.    Numbers can be specified as
  20.    +n for greater than n, or
  21.    -n for less than n,
  22.    n for exactly n.
  23.  
  24.    If none of -print, -ls, -ok, -exec are given, -print is assumed.
  25.  
  26.    -atime n            file last accessed n*24 hours ago
  27.    -ctime n            file status last modified n*24 hours ago
  28.    -depth            true; process dir contents before dir itself
  29.    -exec cmd            exec cmd, true if 0 status returned
  30.    -fulldays            true; from day boundaries rather than from now
  31.    -fstype type            file is on a filesystem of type type
  32.    -group gname            file belongs to group gname (gid allowed)
  33.    -inum n            file has inode number n
  34.    -links n            file has n links
  35.    -ls                true; list current file in 'ls -li' format
  36.    -mtime n            file data last modified n*24 hours ago
  37.    -name pattern        base of path name matches glob pattern
  38.                 ('*' and '?' do not match '.' at start)
  39.    -newer file            modtime is more recent than file's
  40.    -nouser            no user corresponds to file's uid
  41.    -nogroup            no group corresponds to file's gid
  42.    -ok cmd            like exec but ask user first; false if not 'y'
  43.    -perm mode            perm bits are exactly mode (octal or symbol)
  44.    -perm -mode            perm bits mode are set (s,s,t checked)
  45.    -permmask mode        true; set significant bits mask for next -perm
  46.                 (allows testing for unset bits)
  47.    -print            true; print current full pathname
  48.    -prune            (no -depth) true; do not descend current dir
  49.                 (-depth) false; no effect
  50.    -regex pattern        path name matches regex pattern
  51.    -size n[c]            file has n blocks (or chars)
  52.    -type c            file type: b, c, d, p, f, l, s
  53.    -user uname            file is owned by uname (uid allowed)
  54.    -version            true; print find version number on stderr
  55.    -xdev            true; don't descend dirs with different st_dev
  56.  
  57.    Grouping operators (in order of decreasing precendence):
  58.  
  59.    ( expr )            force precedence
  60.    ! expr            true if expr is false
  61.    expr1 expr2            and (implied); expr2 not eval if expr1 false
  62.    expr1 -o expr2        or; expr2 not eval if expr1 true
  63.    expr1 -or expr2        same as -o
  64.  
  65.    find processes files by applying each predicate in turn until the
  66.    overall expression evaluates false.  The expression evaluation
  67.    continues until the outcome is known (left hand side false for and,
  68.    true for or).  Once this happens no more expressions are
  69.    evaluated and find moves on to the next pathname.
  70.  
  71.    Exits with status 0 if all files are processed successfully,
  72.    >0 if error occurrs. */
  73.  
  74.  
  75. ========================================================================
  76.  
  77. Below is a patch for those that have a version of gnulib that is
  78. not 100%ly up-to-date.  By mistake, I included an obsolete version of
  79. pwd.[ch] in the first release.
  80.  
  81. Install this patch only if you have pwd.c (Revision 1.1)
  82. and pwd.h (Revision 1.0).
  83.  
  84. *** e:\tmp/RCSt1005582    Sun Sep 23 17:00:20 1990
  85. --- pwd.c    Sun Sep 23 16:59:26 1990
  86. ***************
  87. *** 15,21 ****
  88.       along with this program; if not, write to the Free Software
  89.       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  90.   
  91. !     $Header: e:/gnu/lib/RCS/pwd.c 1.1 90/09/18 13:43:44 tho Exp $
  92.   */
  93.   
  94.   /* This 'implementation' is conjectured from the use of this functions in
  95. --- 15,21 ----
  96.       along with this program; if not, write to the Free Software
  97.       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  98.   
  99. !     $Header: e:/gnu/lib/RCS/pwd.c 1.2 90/09/23 11:20:57 tho Exp $
  100.   */
  101.   
  102.   /* This 'implementation' is conjectured from the use of this functions in
  103. ***************
  104. *** 62,67 ****
  105. --- 62,68 ----
  106.     pw.pw_name = getlogin ();
  107.     pw.pw_dir = home_dir;
  108.     pw.pw_shell = login_shell;
  109. +   pw.pw_uid = 0;
  110.   
  111.     return &pw;
  112.   }
  113. ***************
  114. *** 77,86 ****
  115. --- 78,94 ----
  116.   getgrgid (int uid)
  117.   {
  118.     gr.gr_name = getgr_name ();
  119. +   gr.gr_gid = 0;
  120.   
  121.     return &gr;
  122.   }
  123.   
  124. + struct group *
  125. + getgrnam (char *name)
  126. + {
  127. +   return (struct group *) 0;
  128. + }
  129.   /* return something like a username. */
  130.   char *
  131.   getlogin ()
  132. ***************
  133. *** 148,153 ****
  134. --- 156,165 ----
  135.   {
  136.   }
  137.   
  138. + void
  139. + endgrent ()
  140. + {
  141. + }
  142.   
  143.   /* return groups.  */
  144.   int
  145. *** e:\tmp/RCSt1005582    Sun Sep 23 17:00:20 1990
  146. --- pwd.h    Sun Sep 23 16:59:28 1990
  147. ***************
  148. *** 15,21 ****
  149.       along with this program; if not, write to the Free Software
  150.       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  151.   
  152. !     $Header: e:/gnu/lib/RCS/pwd.h 1.0 90/09/10 23:16:19 tho Stable $
  153.   */
  154.   
  155.   /* This 'implementation' is conjectured from the use of this functions in
  156. --- 15,21 ----
  157.       along with this program; if not, write to the Free Software
  158.       Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  159.   
  160. !     $Header: e:/gnu/lib/RCS/pwd.h 1.1 90/09/23 11:21:12 tho Exp $
  161.   */
  162.   
  163.   /* This 'implementation' is conjectured from the use of this functions in
  164. ***************
  165. *** 26,50 ****
  166.   
  167.   struct passwd
  168.   {
  169. !   /*     ...         */
  170. !   /* missing stuff */
  171. !   /*     ...         */
  172.     char *pw_name;        /* login user id        */
  173.     char *pw_dir;            /* home directory        */
  174.     char *pw_shell;        /* login shell            */
  175.   };
  176.   
  177.   struct group
  178.   {
  179. !   /*     ...         */
  180. !   /* missing stuff */
  181. !   /*     ...         */
  182.     char *gr_name;        /* login user id        */
  183.   };
  184.   
  185.   extern struct passwd *getpwuid (int);
  186.   extern struct passwd *getpwnam (char *);
  187.   extern struct group *getgrgid (int);
  188.   extern char *getlogin (void);
  189.   extern char *getgr_name (void);
  190.   extern int getuid (void);
  191. --- 26,53 ----
  192.   
  193.   struct passwd
  194.   {
  195. !   /*    ...        */
  196. !   /*    missing stuff    */
  197. !   /*    ...        */
  198.     char *pw_name;        /* login user id        */
  199.     char *pw_dir;            /* home directory        */
  200.     char *pw_shell;        /* login shell            */
  201. +   int  pw_uid;
  202.   };
  203.   
  204.   struct group
  205.   {
  206. !   /*    ...        */
  207. !   /*    missing stuff    */
  208. !   /*    ...        */
  209.     char *gr_name;        /* login user id        */
  210. +   int  gr_gid;
  211.   };
  212.   
  213.   extern struct passwd *getpwuid (int);
  214.   extern struct passwd *getpwnam (char *);
  215.   extern struct group *getgrgid (int);
  216. + extern struct group *getgrnam (char *);
  217.   extern char *getlogin (void);
  218.   extern char *getgr_name (void);
  219.   extern int getuid (void);
  220. ***************
  221. *** 59,64 ****
  222. --- 62,68 ----
  223.   extern struct passwd *getpwent (void);
  224.   extern void setpwent (void);
  225.   extern void endpwent (void);
  226. + extern void endgrent (void);
  227.   
  228.   /*
  229.    * Local Variables:
  230.