rm (remove) command

Richard A. O'Keefe ok at goanna.cs.rmit.oz.au
Mon Feb 18 18:56:09 AEST 1991


In article <1991Feb16.192418.2361 at wpi.WPI.EDU>, jhall at 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



More information about the Comp.lang.c mailing list