What does /dev/null mean in the shell?
- by rishiag
I've started learning bash scripting by using this guide: http://www.tldp.org/LDP/abs/abs-guide.pdf
However I got stuck at the first script:
cd /var/log
cat /dev/null > messages
cat /dev/null > wtmp
echo "Log files cleaned up."
What do lines 2 and 3 do in Ubuntu (I understand cat)? Is it only for other Linux distributions? After running this script as root, the output I get is Log files cleaned up. But /var/log still contains all the files.