Thursday, April 18, 2013

I wanted to find the difference between accessed and modified epochs of a bunch of files. The incantation below gives you this number for each item in a directory:

$ stat -c "%X %Y %N" ~/* | awk '{diff = $1 - $2; print diff, $3}'
40449 '/home/home/my_cgi'
2173034 '/home/home/run_pvr.sh'
124618 '/home/home/tools'

No comments: