Last active
April 22, 2016 13:00
-
-
Save cedricmagne/736218b978206cc5163a5fb631d2f0d1 to your computer and use it in GitHub Desktop.
Linux commands
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
# Truncate a file | |
$ cat /dev/null >| my_file.log | |
## OR | |
$ truncate -s0 yourfile | |
##if permission denied, use sudo | |
$ sudo truncate -s0 yourfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment