in reply to How to erase the file content
Assuming an Unix operating system...
I was going to say truncate but first i tried a kernel trace which indeed opens and closes the file. That leads me to say that redirecting stdin or /dev/null would do the same.
Only way seems to be rm -f file && touch file. Then again (seen via another kernel trace), touch also opened and closed the file.
Well, i am out of ideas...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to erase the file content
by Anonymous Monk on Sep 08, 2005 at 07:05 UTC | |
by sk (Curate) on Sep 08, 2005 at 07:06 UTC | |
by parv (Parson) on Sep 08, 2005 at 07:13 UTC |