Simple: Find new files - Unix

This is a discussion on Simple: Find new files - Unix ; How can I create a find statement that looks for NEW files (say within a day or 2 old) on an AIX Unix drive ... find . -name "*.*" -mtime 2 ! -mtime 0 -print | tee ~/mystuff/test/output.txt Above is ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Simple: Find new files

  1. Simple: Find new files

    How can I create a find statement that looks for NEW files (say within
    a day or 2 old) on an AIX Unix drive ...

    find . -name "*.*" -mtime 2 ! -mtime 0 -print | tee
    ~/mystuff/test/output.txt

    Above is an example of some code that I found that is "supposed to"
    work. As best as I can tell... it doesn't select a thing!
    (I'm not sure about the use of this exclamation point[!] for creating a
    RANGE!)


  2. Re: Simple: Find new files

    gnubie wrote:
    > How can I create a find statement that looks for NEW files (say within
    > a day or 2 old) on an AIX Unix drive ...
    >
    > find . -name "*.*" -mtime 2 ! -mtime 0 -print | tee
    > ~/mystuff/test/output.txt
    >
    > Above is an example of some code that I found that is "supposed to"
    > work. As best as I can tell... it doesn't select a thing!
    > (I'm not sure about the use of this exclamation point[!] for creating a
    > RANGE!)
    >

    Hi,
    try "find . -mtime -2" ->finds files less than 2 days old
    or
    "find . -mtime +2" ->finds files more than 2 days old

  3. Re: Simple: Find new files

    Thanks, you nailed it! Simplicity is usually the best policy. I have
    to believe I tried that about 5 times and must not have noticed the
    results. Now I'll start adding in the awk / xargs ls -l components
    that somehow redirect etc. I guess the newer component may help me
    too. Thanks so much!


+ Reply to Thread