To clear or empty a file in Ubuntu without opening it, you can simply open the terminal and use the following command.
> filename.txt
That’s it. The contents of the file filename.txt
will be cleared without opening it.
To clear or empty a file in Ubuntu without opening it, you can simply open the terminal and use the following command.
> filename.txt
That’s it. The contents of the file filename.txt
will be cleared without opening it.