I have found this command few years ago and used it since then to empty file.
But how this really works?
:>
used like
:> /server/logs/access_log
>
is the redirection operator. :
is a builtin shell command, and is equivalent to to the true
command, it is used mostly as a placeholder in scripts.
:> filename
will make your file empty.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With