Find the answer to your Linux question:
Results 1 to 3 of 3
hi all, is it possible for me to search a file base on the modified date, for example to search a file that modified after 23 November 2005 ?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Dec 2005
    Location
    Singapore
    Posts
    234

    Search file


    hi all,
    is it possible for me to search a file base on the modified date, for example to search a file that modified after 23 November 2005 ?
    Proper Planing is a way of success

  2. #2
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    This seems possible using the find command. The command should look like the following:
    Code:
    find /path/to/start/of/tree/to/search -mtime -n
    Where 'n' is the number of days past that you want to accept.

    So let's say that I want to see all files from the tree starting at ~/test/ that were modified no later than 5 days ago:
    Code:
    find ~/test/ -mtime -5
    EDIT:

    Oopsie, it's "-mtime", not "-ctime".

  3. #3
    Linux Newbie
    Join Date
    Dec 2005
    Location
    Singapore
    Posts
    234
    Quote Originally Posted by Cabhan
    This seems possible using the find command. The command should look like the following:
    Code:
    find /path/to/start/of/tree/to/search -mtime -n
    Where 'n' is the number of days past that you want to accept.

    So let's say that I want to see all files from the tree starting at ~/test/ that were modified no later than 5 days ago:
    Code:
    find ~/test/ -mtime -5
    EDIT:

    Oopsie, it's "-mtime", not "-ctime".
    ok thanks for ur reply
    Proper Planing is a way of success

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •