Discussion: the newer of 2 files
Afficher un message
Vieux 27/05/2007, 06h02   #1
osiris@abydos.kmt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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.

  Réponse avec citation
 
Page generated in 0,05323 seconds with 9 queries