Search code examples
bashshellkshaix

Find files created 1 hour ago


I want to list files with long description on AIX that was created from 1 hour ago. I am trying find . -cmin -60 but it only shows the file names. Was trying also find . -cmin -60 -exec ls -l {} \; but it was displaying the whole files in the directory.

Thank you


Solution

  • I think what you want is

    find . -cmin +60 -exec ls -al {} \;
    

    It will list all the files in current directory created more than 60 minutes agp.

    The '+' in the '+60' means more than 60 minutes ago while a '-' in the '-60' means less than 60 minutes ago.