Created
August 12, 2016 20:36
-
-
Save Kyle-Falconer/44aedcda4eb3cb91f36f99c358f3155b to your computer and use it in GitHub Desktop.
Empty a file in place.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
truncate -s 0 $1 | |
# example, to erase the logs: | |
# sudo truncate -s 0 /var/log/apache2/* | |
# sudo truncate -s 0 /var/log/nginx/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment