Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- cd /home/pi/JPGS
- fn=$(ls -rt1 | tail -1)
- mv -f $fn /home/pi/WWW/webpic.jpg
- #! /bin/sh -
- cd /home/pi/JPGS || exit
- fn=$(ls -t | head -n1)
- mv -f -- "$fn" /home/pi/WWW/webpic.jpg
- #! /bin/zsh -
- mv -f /home/pi/JPGS/*.jpg(.om[1]) /home/pi/WWW/webpic.jpg
- fn=(/home/pi/JPGS/*.jpg(.om[1]))
- $ ls -t | head -n1
- -t sort by modification time, newest first
- -c with -lt: sort by, and show, ctime (time of last modification of
- file status information) with -l: show ctime and sort by name
- otherwise: sort by ctime, newest first
- $ ls -tc | head -n1
- $ mv -f -- "$fn" /home/pi/WWW/webpic.jpg
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement