I tried this but it didn't find any files. I then touched a new file and put in in a subdirectory under where I stated and it didn't find it.
I then touched another file in the root of where I am starting my search and it was found using the following command.
first the touch command for the file I am looking for.
#touch ~/data/repository/thumb/vol1/fileone
now the touch for the file dated 1/10/2011
#touch -t 201101100000 ~/DATEFILE
now the find command that didn't work
#find ~/data/repository/ -newer ~/DATAFILE -exec ls -la {} \;
This returned all folders and files in this folder, not just the ones that were newer than ~/DATAFILE.
Additionally, I touched another file as today, and placed it on ~/data/repository and this one was also returned along with all folders in the ~/data/repository location.
Did I explain this well enough? Does this make sense?
The second one says ~/DATAFILE, the first ~/DATEFILE
My example assumed:
the file named dummy was in the current working directory
# more explicit example
find /path/to/files -newer ./dummy -type f -exec ls -la
This finds regular files: -type f
Consider following the example, if there is confusion. The example I gave you works on any POSIX-compliant UNIX.
The construction of a find query in the example above is:
[code]
find [path is required] -newer [exact path to file ] -type [one of -l -f -d] -exec [shell command required]
where:
-l = link
-d = directory
-f = regular file