Quick question: recursive touch?

Ivan Van Laningham ivanlan at callware.com
Tue Oct 5 17:54:06 EDT 1999


Hi All--

Preston Landers wrote:
> 
> In article <7tdie6$cq1 at dfw-ixnews5.ix.netcom.com>,
>   aahz at netcom.com (Aahz Maruch) wrote:
> 
> > I haven't really looked at your code, but I needed to mention that
> > 'open(file,"w")' will cause the file to become zero bytes long.
> 
> Isn't that what touch does?
> 

No.  If the file exists, it simply updates access and modification
times, unless you give it other arguments.  Causing a file to become
zero bytes long is the job of 'cat /dev/null > zerofile' (at least from
the shell).  If no file exists, it creates a zero-length file.

<yes-we-have-no-binaries>-ly y'rs,
Ivan
----------------------------------------------
Ivan Van Laningham
Callware Technologies, Inc.
ivanlan at callware.com
ivanlan at home.com
http://www.pauahtun.org
See also: 
http://www.foretec.com/python/workshops/1998-11/proceedings.html
Army Signal Corps:  Cu Chi, Class of '70
----------------------------------------------




More information about the Python-list mailing list