Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!munnari.oz.au!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: rm (remove) command Message-ID: <4781@goanna.cs.rmit.oz.au> Date: 18 Feb 91 07:56:09 GMT References: <1991Feb16.192418.2361@wpi.WPI.EDU> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 13 In article <1991Feb16.192418.2361@wpi.WPI.EDU>, jhall@wpi.WPI.EDU (John Clinton Hall) writes: > Where can I get the C source to rm (remove)? For which operating system? (There _is_ more than one possible answer.) main(argc, argv) int argc; char **argv; { extern int unlink(); while (*++argv) if (unlink(*argv)) { perror(*argv); exit(1); } exit(0); } The rest is frills and error reporting. (See rmdir(), readdir(), and getopt()). -- Professional programming is paranoid programming