|
Question:
How to delete file content in linuxHow can I delete file content without opening the file? Is there such command in Unix/Linux?
I want to delete the content of some log files.
If you want to delete the contents of a file without removing and recreating it you can try:
Vote:
If you want to truncate a log file that is in use(process writes to it) by a running process without stopping the process then all that you need is the following shell command to clear out the active log file:
Vote:
Please vote! Your opinion matters!
If you haven't found what you've looking for, post a question
|
|