last file modified
# ls -lrt * |tail -l
-rw-r--r-- 1 root root 2060 2013-01-18 02:09 pre-lock.tmpl
-rwxr-xr-- 1 root root 2764 2013-01-18 02:09 pre-revprop-change
-rw-r--r-- 1 root root 2764 2013-01-18 02:09 pre-revprop-change.tmpl
-rw-r--r-- 1 root root 2001 2013-01-18 02:09 pre-unlock.tmpl
-rw-r--r-- 1 root root 2137 2013-01-18 02:09 start-commit.tmpl
locks:
total 8
-rw-r--r-- 1 root root 139 2013-01-18 02:09 db-logs.lock
-rw-r--r-- 1 root root 139 2013-01-18 02:09 db.lock
guess what i'm looking at.
this is a recursive search using stat
# find $1 -type d -print0 | xargs -0 stat --format '%Y :%y %n' | sort -nr | cut -d: -f2- | head
Monday, August 24, 2015
last file modified
Tuesday, August 18, 2015
how not to go to hell or run named commands
some times is to good to named-checkzone before you commit those changes to bind.
i have a little script that issues named-checkzone on my zone off of the db.
i do this for forward and reverse zones.
...
#!/bin/bash
echo aplace forward
named-checkzone aplace.calledhell.com db.aplace.calledhell.com
echo anotherplace forward
named-checkzone anotherplace.calledhell.com db.anotherplace.calledhell.com
echo 6.66 reverse
named-checkzone 66.6.10.in-addr.arpa db.10.6.66
echo 6.67 reverse
named-checkzone 67.6.10.in-addr.arpa db.10.6.67
...
and then i will load everything and tail my syslog for any lingering errors in another terminal.
...
#!/bin/bash
echo 6.66 reverse
rndc reload 66.6.10.in-addr.arpa
echo 6.67 reverse
rndc reload 67.6.10.in-addr.arpa
echo aplace forward
rndc reload aplace.calledhell.com
echo anotherplace forward
rndc reload anotherplace.calledhell.com
...
i heart doing this domain by domain and subnet by subnet so i am not in a place called hell.
i mentioned keep another terminal open, right?
Subscribe to:
Posts (Atom)