*BSD News Article 67403


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!news.ysu.edu!usenet.ins.cwru.edu!gatech!news.cse.psu.edu!uwm.edu!vixen.cso.uiuc.edu!newsfeed.internetmci.com!in2.uu.net!EU.net!Germany.EU.net!Dortmund.Germany.EU.net!interface-business.de!usenet
From: j@ida.interface-business.de (J Wunsch)
Newsgroups: comp.unix.misc,comp.unix.bsd.misc
Subject: Re: How to delete files within C programs
Date: 1 May 1996 19:09:00 GMT
Organization: interface business GmbH Dresden
Lines: 18
Message-ID: <4m8csc$3jg@innocence.interface-business.de>
References: <Oum-El-Kheir.Benkahla-3004961724540001@mac-ugm-3.imag.fr>
  <4m5p3k$3nq@dfw-ixnews2.ix.netcom.com> <4m7sr3$rf9@news.rhrz.uni-bonn.de>
Reply-To: joerg_wunsch@interface-business.de (Joerg Wunsch)
NNTP-Posting-Host: ida.interface-business.de
X-Newsreader: knews 0.9.6
Xref: euryale.cc.adfa.oz.au comp.unix.misc:22321 comp.unix.bsd.misc:879

juengst@saph1.physik.uni-bonn.de (Henry G. Juengst) writes:

>>Very simple solution, use the 'unlink' system function to delete files
>
>This might be a simple solution if you know the solution, but why should
>a beginner know that the function to delete a file is not something like
>'delete_file', but 'unlink' in the unix mud ? 

The basic problem (in understanding) is that there is no such function
to _delete_ a file, only one to remove a directory entry.

Anyway, unlink() is plain standard C, so you can get any C book to
learn this.

-- 
J"org Wunsch					       Unix support engineer
joerg_wunsch@interface-business.de       http://www.interface-business.de/~j