I want to find the files which are kept in my local directory with the filename format Heena_Report_MMDDYYY.CSV through Unix Command from date March 2016 till date?? Moreover i want to keep the files for the current month in the specific folder and previous all month files i want to delete.. I am writing one automation script where this logic has to be incorporated. Please Help.

  • 4
    Show us what you have tried... – jasonwryan Sep 15 '16 at 7:16
  • 1
    Since these filenames have your name in it, it's fairly probably your fault that the date is MMDDYYY, rather than the intelligent order YYYYMMDD which sorts lexicographically in order of increasing date. Don't write dates like that to a computer. – Kaz Sep 15 '16 at 21:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.