
Sometimes when we need to get fresh logs data in existing logs files and log file is too large to open, then we need to delete content of existing log files.
There are several ways to truncate or empty files.
- : > application.log
- cat /dev/null > application.log
- truncate -s 0 application.log
Empty All logs file ending with .log
sudo truncate -s 0 /<directory path>/**/*.log
Search
Categories
Recent Posts
Top 10 Free Audio Generation AI Tools in 2025
Top 10 Free Video Generation AI Tools in 2025
Top 10 Free Image Generation AI Tools in 2025
Top 10 Free Text-Based AI Tools in 2025
Top Git interview Questions for Experienced Developer
Recent Tags