*BSD News Article 34359


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!EU.net!sun4nl!news.nic.surfnet.nl!tuegate.tue.nl!usenet
From: wmbfmk@urc.tue.nl
Newsgroups: comp.os.386bsd.questions
Subject: Re: Help! How to remove file with "-"
Date: 15 Aug 1994 08:40:39 GMT
Organization: TUE
Lines: 24
Message-ID: <32n9m7$4cd@tuegate.tue.nl>
References: <32mrgg$le2@netbsd08.dn.itg.telecom.com.au>
Reply-To: wmbfmk@urc.tue.nl
NNTP-Posting-Host: pc67.wmw.tue.nl

You may, alternatively, try this little program:


#include <stdio.h>
#include <unistd.h>


int
main(int argc, char **argv)
{
	if (argc==2) {
		if (unlink(argv[1]) != 0) {
			printf("Could not delete <%s>\n", argv[1]);
			return(-1);
		}
	} else {
		printf("usage: %s <filename>\n", argv[0]);
	}

	return(0);
}