ciphermethod.com

Archive for November, 2013

500 OOPS: vsftpd: refusing to run with writable root inside chroot()

by on Nov.26, 2013, under Linux

500 OOPS: vsftpd: refusing to run with writable root inside chroot()

Solution:
chmod ugo-w /path/to/directory

Leave a Comment more...

20131119: qpurge.sh

by 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

Leave a Comment more...


Find Files From A Specific Year

by 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

Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

But Wait, There's More!

A few highly recommended friends...