I would like to get only some particular date logs from /var/adm/messages. Please suggest any command or script to get this.
try
ls -ltr | awk '{ if($6 == "Jul" && $7 == "10" && $8 == "2009") {print $0}}
It will print files for 10-07-2009
OR
ls -ltr | grep "Jul.*10.*2009"
Simply we can use the below one, it works well.
#cat /var/adm/messages | grep -i "Aug 29"
It will list only Aug 29th logs.
Makarand Dodmis, please reread the question.
seenuvasan, Useless Use of Cat, this is sufficient:
grep -i "Aug 29" /var/adm/messages