Answer the question
In order to leave comments, you need to log in
How to clear a large file in Linux?
What are the possible options for cleaning a huge file in Linux, let's say there are several GB of data accumulated there? Accessible, this is a log or something else.
Without recreating
Without deleting the file itself
Answer the question
In order to leave comments, you need to log in
If someone writes to this file and I need to clear it, I usually do this
> /path/logfile.log
If that this command will erase EVERYTHING in the file!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question