the newer of 2 files
I thought of a way to compare modification dates
of two files in order to determine which is newer.
The man page does not explain this.
However, I'm not sure whether this is accurate:
$ touch old
$ touch new
$ find . -name old -newer new
<no output>
$ find . -name new -newer old
../new
I would have expected the first command to tell me
that the file named "new" is newer
yet I suspect that because "old" is not newer, there is no output.
So I should interpret this comparison in the first example as:
find (in the current directory tree) if the file with -name "old"
is -newer than the file named "new""
is that correct?
Thanks.
|