November 9th, 2005, 09:24
Hi all,

I've just bought a new IP webcam and I'm in the process of trying to set it up. The old webcam I'm replacing used to perform motion detection and once spotted it would upload a single file of a defined name (webcam.jpg) as an example.

The new camera however, creates dated subdirectories and each image has a time and date stamp filename.. Is there an easy way through the magic of ls or other commands to filter out the latest created filename so I can build an update script to show the latest image on the webpage?


November 9th, 2005, 13:16

On freebsd man ls gives the -c, -t, and -u options. Should any of those should fit the bill perfectly.

ls -1 -t dirname