Hi. Modified since when? Or modified compared to what when? Since the file was first created? Since the last time you checked?
Either way, you'd have to check the file itself to see whether it was modified. You could get it's modification time from the inode of the file. You can access/check it from the shell using find's -mmin or -mtime argument. Either way, if you want to know whether a directory contains files that have been modified, you have to check all the files in a directory. Here is an example, this tests whether any of the files in /usr/local/xxyzy/ have modification times less than 12 minutes (IOW recently modified): if [ -z "`find /usr/local/xxyzy/ -mmin -12 -print`" ] ; then echo no files have been modified within 1 min ; fi HTH, Aleksey On Sat, Mar 8, 2008 at 11:40 PM, david <[EMAIL PROTECTED]> wrote: > #!/bin/bash > if [ -N /some/directory/ ] ; then > echo "change" > else > echo "no change" > fi > > The object is to identify changes within a directory. This tells me if > there are any new or deleted files, but not if files within the > directory are modified. > > Is there a trivial way to do it? > > > -- > SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ > Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html > -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
