Newbie with an easy question

I'm looking to write a script that takes a certain directory and gzips all its files that are older than 2 days. I've done some research but for the life of me, I can't even get any files gzipped. Any help would be greatly appreciated!

post any code you have written so far to try and accomplish your goal.

find /folder/path -mtime +2 -exec gzip {} \;

This is what I've come up with so far. Is there a benefit to adding -f to this script? Also, is there a command that would list out the files that were zipped after the above is performed?

Thanks

gzip has a verbose option (IIRC -v) so it will tell you what it zips.

How was this not working for you?

I don't see what adding an -f option would help. Sounds more like taking a risk.