Archive for agosto, 2006
Cronjob
Tra le cose inutile ma belline c’è questo piccolo script. Elimina dal cestino i file cestinati due settimane fa. Editare il percorso della home, salvarlo in /etc/cron.daily e renderlo eseguibile.
su
cp cleantrash.sh /etc/cron.daily
cd /etc/cron.daily
chmod 755 cleantrash.sh
exit
#!/bin/bash
# Clean Trash 0.1
#
# Removes old files from the KDE trash folder.
# (c) 2005-2006 Bram SchoenmakersEXPIREDATE=`date -d’14 days ago’ +%Y%m%d`
#edit path like this: /home/youraccount/.local/share/Trash
TRASHDIR=~/.local/share/Trashcd $TRASHDIR/info
for ITEM in *.trashinfo; do
ITEMNAME=`echo “$ITEM” | sed -e ‘s/.trashinfo//’`#extract date
TRASHDATE=`grep DeletionDate “$ITEM” |
sed -e ‘s/^.*\(….\)-\(..\)-\(..\)T.*$/\1\2\3/’`if [ $TRASHDATE -le $EXPIREDATE ]; then
rm -rf “$TRASHDIR/files/$ITEMNAME”
rm -f “$TRASHDIR/info/$ITEM”
fi
done
In alternativa si può giocare con l’editor del crontab personale
crontab -e
i
@daily /home/tuoaccount/percorso_dello_script cleantrash.sh
esc
Z-Z
Un valore interessante è @reboot, lo script viene eseguito all’avvio. Un approfondimento per crontab , in inglese.
Post (forse) correlati:
Un altra regione va verso l’open-source
Post (forse) correlati:
cinque cose
… che Microsoft dovrebbe imparare da Gnu/Linux.
E sarà difficile che lo fa…
What Vista’s developers should have done is taken a page from Linux’s playbook. In Linux and Unix, the systems were built from the ground-up with the knowledge that a system could have multiple users and that it would be connected to an untrustworthy network.
Can Linux be hacked? Sure. Anything can be. But, it’s fundamentally harder in Linux. Even when a cracker does make it in, it’s still difficult to do significant damage without access to the root account in Linux.
With Windows, once you’re in, it’s an order of magnitude easier to turn the box into a spambot, rip off every password in sight, and do everything up to and including making the PC completely unusable. Who needs this?
Post (forse) correlati:
