I am currently using this shell to move 25 files to another folder automatically. But It moves files by alphabetical order, that's my main concern. I would like the oldest files to be moved first instead.
i=0
for x in *; do
if [ "$i" = 25 ]; then break; fi
mv -- "$x" /my/other/folder/
i=$((i+1))
done
Thanks!
zsh
? – steeldriver Oct 23 '20 at 01:20