3 ms·
If your intention is to totally remove the space that's occupied by the log file, you'll probably want to pipe /dev/null into the file: cat /dev/null > /path/t
by cparedes 16y ago
If your intention is to totally remove the space that's occupied by the log file, you'll probably want to pipe /dev/null into the file:
cat /dev/null > /path/to/logfile
- whacker 16y agoThat does not do what you think it does. Your command will make /path/to/logfile fill up all available space on the disk. To truncate that file, which is probably what you wanted to do, you should `echo > /path/to/logfile`
- DerKommissar 16y agoHis command does exactly what he says it does. Your command truncates the file and then writes a newline into it.