How do you empty a file in Linux without opening it?

How do you empty a file in Linux without opening it?
Answer
5 Ways to Empty or Delete a Large File Content in Linux
  1. Empty File Content by Redirecting to Null. …
  2. Empty File Using ‘true’ Command Redirection. …
  3. Empty File Using cat/cp/dd utilities with /dev/null. …
  4. Empty File Using echo Command. …
  5. Empty File Using truncate Command.
1 дек. 2016 г.
 

Tìm kiếm

Back
Top