help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] How to understand non existent file is considered as the old


From: Peng Yu
Subject: [Help-bash] How to understand non existent file is considered as the oldest?
Date: Thu, 9 Apr 2015 17:25:22 -0500

Hi,

'file' exists and 'notexist' does not exist. The following example
basically means that non existent file is always considered as oldest
when they are compared with a existent file. But this is not quite
intuitive to me, as non existent file is yet to be created. It is more
intuitive to consider non existent file as newest.

[ notexist -nt file ] # false
[ notexist -ot file ] # true
[ file -nt notexist ] # true
[ file1 -ot notexist ] # false

But the decision of non existent file as the oldest must have some
rationale behind it. Could anybody let me know? (This might also help
me memorize this rule better.)

-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]