Codebase list live-build / 4e5dd58
Use truncate --no-create --size=0 to truncate files This avoids the permission error due to /proc/sys/fs/protected_regular = 2 setting which is now enabled by default in kali-rolling. Raphaƫl Hertzog 3 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
44 # Truncate log files
55 for _FILE in $(find /var/log/ -type f)
66 do
7 : > ${_FILE}
7 truncate --no-create --size=0 ${_FILE}
88 done