S
S
shellnet2021-06-23 10:06:13
linux
shellnet, 2021-06-23 10:06:13

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

1 answer(s)
D
Dmitriy Loginov, 2021-06-23
@warlinx

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 question

Ask a Question

731 491 924 answers to any question