Re: [SLUG] bash - identify changes within a directory.

2008-03-10 Thread david
On Sun, 2008-03-09 at 19:45 +0100, Massimiliano Fantuzzi wrote: Hi Guys ! I really agree with all those methods, they are scriptable and efficient, but the best choice at present day is another... Is the choice for userland utilities (inotify-tools) to the new kernel module inotify. It

Re: [SLUG] bash - identify changes within a directory.

2008-03-09 Thread Aleksey Tsalolikhin
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

Re: [SLUG] bash - identify changes within a directory.

2008-03-09 Thread ken Foskey
On Sun, 2008-03-09 at 18:40 +1100, david 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

Re: [SLUG] bash - identify changes within a directory.

2008-03-09 Thread Massimiliano Fantuzzi
Hi Guys ! I really agree with all those methods, they are scriptable and efficient, but the best choice at present day is another... Is the choice for userland utilities (inotify-tools) to the new kernel module inotify. It gives granular auditing for files, directories and sockets in general, and

Re: [SLUG] bash - identify changes within a directory.

2008-03-09 Thread Lindsay Holmwood
I second this: inotify-tools is a fantastic package (written by an Aussie, no less) that's very easy to wrap in shell script. The only problem i've ever had with inotifywait was when I recursively ran it over a directory with about 30 subdirectories and 80,000 files. It took *ages* to start, and

Re: [SLUG] bash - identify changes within a directory.

2008-03-09 Thread Amos Shapira
On Mon, Mar 10, 2008 at 8:27 AM, Lindsay Holmwood [EMAIL PROTECTED] wrote: I second this: inotify-tools is a fantastic package (written by an Aussie, no less) that's very easy to wrap in shell script. I third that (about using inotify if supported by your kernel). That aside, though. I just

[SLUG] bash - identify changes within a directory.

2008-03-08 Thread david
#!/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? --