initialize file to zero

hi
can anyone tell how to initialize a file to zero

What exactly do you mean ? Make the file size 0 bytes ? If yes, run :

> yourFileName

and the file will become empty. Warning : you will lose all the information inside.

you can use touch also.
refer touch man page

Note 1: to the unaware, touch won't truncate an existing file. It just creates one and updates the last modified timestamp.

Note 2: Many distributions set the bash noclobber option, so > file won't truncate an existing file - instead an error will occur. Use >| file instead.