Zipping files older than one month

I have to zip all files older than a month within a directory.
I have to archive them using the file extension
I have .dat, .csv ,.cnt files within the directory.

I used the following command It doesnt work
find /path/*.dat -mtime +30
This command doesnot display .dat files older than a month

I used a different method which is tedious, but does the zipping month wise

zip dat_zip.zip `ls -rtl *.dat|grep Jan |awk '{print $9}'`

After doing this I have the zip files in the zip directory, but if i remove Jan files from the folder using this command
ls -rtl *.dat | grep Jan | awk '{print $9}' | rm *.dat
I lose all the dat files for other months too.
As per my knowledge '|' gives o/p from previous command as I/p for next command , why am i losing all the .dat files(from other months too)

Guru's Please shed some light.

Thanks and Regards,
Ram.

Try:

find /path -name "*.dat" -mtime +30

Regards

This is basically equivalent to

ls -rtl *.dat | grep Jan | awk '{print $9}' >/dev/null
rm *.dat

so no wonder your *.dat files are gone. The right syntax for using the pipeline (and avoiding the Useless Use of grep | awk) is

ls -rtl *.dat | awk '/Jan/{print $9}' | xargs rm

or you could use backticks, but they are always a bit perilous, IMHO.