To truncate a file to zero length without changing permissions, here are the options
1) cp /dev/null file.xxx
2) : > file.xxx
In the second option involving colon(:), the : being a shell built-in command, no new process is forked.
1) cp /dev/null file.xxx
2) : > file.xxx
In the second option involving colon(:), the : being a shell built-in command, no new process is forked.
No comments:
Post a Comment