@Athin here is your script code :
#!bin/sh
for i in {1..10}
do
mktemp --suffix=.new file$i.XXX
done
getLatestFile=$(ls -Art | tail -n 1)
echo "Last Modified File :" $getLatestFile
chmod 600 $getLatestFile
- Code will create 10 files
- Add Extension ".new" to all the files in a directory...