You are not logged in.
Upon discovering the power of cron, i have made scripts to clean & backup important files from my system. They are really bare bones & some stuff are missing, but could be usefull in an event of a total meltdown, and run some trivial cleanup commands...
The backup script
#!/bin/bash
# A litle script to make live easier
##Making a list of packages
pacman -Qqm > /data/backup/pkglocal >> /dev/null 2>&1
pacman -Qqe > /data/backup/pkglist >> /dev/null 2>&1
##Untar with tar xvpfz foo.tar.gz -C "parent directory"
#backing up /etc
tar cvpzf /data/backup/etc.tar.gz /etc >> /dev/null 2>&1
#Backing up local package database, just in case.
tar cvpzf /data/backup/local.tar.gz /var/lib/pacman/local >> /dev/null 2>&1
#Backing up the /home dir.
tar cvpzf /data/backup/home.tar.gz --exclude=lost+found /home >> /dev/null 2>&1
The cleanup script
pacman -Sc --noconfirm >> /dev/null #2>&1
echo y|pacdiffviewer -c >> /dev/null #2>&1 ##probably doesn't work good
pacman-optimize >> /dev/null #2>&1
Any suggestion is more than apreciated
If it ain't broke, broke it then fix it.
Offline
Since pacman-optimize suggests running sync afterwards you might as well add it too
There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums. That is why we avoid it. -- ewaller (arch linux forum moderator)
Offline
Another note, "echo y | .." can be replaced with "yes | .." if I'm reading that correctly.
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline