Afficher un message
Vieux 01/11/2006, 20h50   #2
Daniel Rock
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: script to monitor pdf files

Surya Dutt <suryadus@bridgeport.edu> wrote:
> Hi,
>
> Am trying to write a shell script that monitors all the pdf files created in
> the current directory. Every minute it should display a list of those
> filenames created after the previous display .. I am trying to use the sleep
> command, but unable to get it to work..


touch -t 198001010000 old
while :; do
sleep 59
touch now
sleep 1
find . -name '*.pdf' -newer old -print
mv now old
done

Serve with sugar on top.

Note: Some files might be listed twice.

--
Daniel

  Réponse avec citation
 
Page generated in 0,05181 seconds with 9 queries