I needed a quick way to maintain a current symlink to the most recent file by time stamp. Here’s one way to do it:
ls -t1 *.jpg | head -1 | xargs -i ln -sf {} current.jpg
Linux System Admin Blog….
I needed a quick way to maintain a current symlink to the most recent file by time stamp. Here’s one way to do it:
ls -t1 *.jpg | head -1 | xargs -i ln -sf {} current.jpg