[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: truncating files



cm>> 
cm>> 1) > foo
cm>> 2) cp /dev/null foo
cm>> 
cm>> Problems:
cm>
cm>> 2) cp /dev/null foo won't take multiple filenames as arguments
cm>
cm>> So the answer is that I do need a script or program to do the job.
cm>
cm>What about:
cm>
cm>rm -f {list of filenames}
cm>touch {list of filenames}

This doesn't work if you don't have write permission to the
directory.  The solution should be able to truncate any file
I have write access to, even if I can't write to the directory.

Otherwise rm -f / touch would be ok.

Carl

--mummert@cs.wcu.edu-----------
One must imagine Sysiphus happy



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: