I have a directory that contains a number of history files for a process. Every file starts with the string "EVACK". FOr example
EVACK0101.000001
EVACK0102.095940
EVACKmmdd.hhmiss
I want to erase in the specific directory ONLY(no sub-directories) all EVACK files older then 90 days. I tested the find command using the following script.
find . -name "EVACK*" -ctime +90 -exec ls {} \;
and it found files in subdirectories that started with EVACK, which are older then 90 days and which I don't want deleted. Can anyone help me out with the correct command?
I looked in the Dummy answers and they all suggested find.