First page Back Continue Last page Overview Graphics
Super-Simple Scripts
Many scripts simply run a few commands that you would want to do frequently. For example:
- #!/bin/sh
- cat /dev/null > /var/log/messages
- cat /dev/null > ~/root/.bash_history
- cat /dev/null > /var/log/wtmp
Note, sh is a symlink to bash and invokes a supposedly [Bourne] sh-portable environment
Run this from cron every N hours (real motd in
/etc/motd.in):
- cat /etc/motd.in > /etc/motd
- /usr/games/fortune -s >> /etc/motd
Notes: