A new addition to my root.crontab is -

00 3 * * * /home/boztu/cron/cache.sh

which calls the file 'cache.sh'.

1
2
3
#!/bin/bash -x
 #shell script for use with rsync in root crontab
 /usr/bin/rsync -av /var/cache/apt/archives/ /media/disk/cache/ >> /home/boztu/cron/archives.txt

which copies the debs from /var/cache/apt/archives/ to /media/disk/cache/ and then writes /home/boztu/cron/archives.txt. This runs every night at 0300 and means that if I do have to do a reinstall I don't have to redownload all of them again, just do a local install instead.

When I do a fresh install the first file that I install afterwards is 'vnstat' which monitors your downloads and tells you in graphical form how much you've downloaded in the last 24 hours. Then I install in no particular order 'ntp', 'logwatch' and many others.

I tend to use emacs for file editing as I prefer it over vi, but I find it difficult to remember the key sequences for various events. So here is my aide memoire -

  • ctrl-x ctrl-s to save
  • Ctrl-x ctrl-c to exit
  • Ctrl-x ctrl-w to save as.


Comments

comments powered by Disqus