Archive for November, 2013
500 OOPS: vsftpd: refusing to run with writable root inside chroot()
by dervish on Nov.26, 2013, under Linux
500 OOPS: vsftpd: refusing to run with writable root inside chroot()
Solution:
chmod ugo-w /path/to/directory
20131119: qpurge.sh
by dervish on Nov.19, 2013, under Linux, Scripts
DO NOT USE: Use 20140218: qpurge.sh
#!/bin/bash
# Created 20131119 by Jamey Hopkins
# Cancel all jobs older than X days
# Example: qpurge 0 will cancel jobs not created on current day
if [ “$1” = “” ]; then
echo Enter days to cancel.
echo Example: qpurge 1
exit
fi
if [ `id -un` != “root” ]; then
echo “Need to be root.”
exit
fi
X=$1
echo “Total Jobs Before: `lpstat -o | wc -l`”
find /var/spool/cups/c* -daystart -mtime +$X >qpurge.tmp 2>/dev/null
for FILE in `cat qpurge.tmp`
do
basename $FILE | sed ‘s/c//g’ | xargs cancel
done
echo “Total Jobs After: `lpstat -o | wc -l`”
rm qpurge.tmp
Find Files From A Specific Year
by dervish on Nov.07, 2013, under Linux
Find files that were last modified in 2010:
ls -la | awk ‘{ if ( $8==2010) printf $9″\n” }’
Example:
$ ls -la | awk ‘{ if ( $8==2010) printf $9″\n” }’
./acr469.dat.19225756.processed
$ ls -la ./acr469.dat.19225756.processed
-rw-rw-r– 1 owner group 44280 Dec 31 2010 ./acr469.dat.19225756.processed