*BSD News Article 67337


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.uoknor.edu!news.nodak.edu!netnews1.nwnet.net!news.u.washington.edu!uw-beaver!uhog.mit.edu!news.mathworks.com!fu-berlin.de!news.belwue.de!news.uni-stuttgart.de!news.rhrz.uni-bonn.de!saph2.physik.uni-bonn.de!juengst
From: juengst@saph1.physik.uni-bonn.de (Henry G. Juengst)
Newsgroups: comp.unix.misc,comp.unix.bsd.misc
Subject: Re: How to delete files within C programs
Date: 1 May 1996 14:35:15 GMT
Organization: Institut fuer Strahlen- und Kernphysik
Lines: 24
Sender: juengst@saph2.physik.uni-bonn.de (Henry G. Juengst)
Distribution: world
Message-ID: <4m7sr3$rf9@news.rhrz.uni-bonn.de>
References: <Oum-El-Kheir.Benkahla-3004961724540001@mac-ugm-3.imag.fr> <4m5p3k$3nq@dfw-ixnews2.ix.netcom.com>
Reply-To: juengst@saph1.physik.uni-bonn.de
NNTP-Posting-Host: saph1.physik.uni-bonn.de
Xref: euryale.cc.adfa.oz.au comp.unix.misc:22296 comp.unix.bsd.misc:872


In article <4m5p3k$3nq@dfw-ixnews2.ix.netcom.com>, SolutionWorks <solwork@popd.ix.netcom.com> 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 ? 

>from C programs.  If the name of the file is variable, use 'sprintf'

Same for 'sprintf'. This is not a function for fast sprinter. .-)

>to create the filename, then 'unlink' to delete it...
>
>Rich

Henry

--
juengst@saph1.physik.uni-bonn.de         [131.220.161.1]  (Internet)
omni:.de.uni-bonn.physik.saph1::juengst                   (DECnet/OSI, phase V)
saph1::juengst                           [26.358]         (DECnet, phase IV)

Any opinions in this mail are my own.