|
If you want to select the file which are created in the latest date, you have to do like this :
mon=`ls -lrt | awk '{print $6}' | tail -1`
day=`ls -lrt | awk '{print $7}' | tail -1`
for file in `ls -l | grep "$mon $day" | awk '{print $9}'`
do
echo $file
done
|