[OpenIndiana-discuss] using touch ... whats wrong here

Harry Putnam reader at newsguy.com
Thu Dec 3 07:52:55 UTC 2015


Not particularly and OI question but that is where I need this
technique to work.  I'm hoping some of you old shell hands will
see the problem.

I hope not to be exibiting true ignorance... but here I go.

I keep messing with one forumlation of find cnmd that seems like it
aught to work...  What am I doing wrong or not understanding?

I'm trying to use finds' -c newer technique

Check on just two of many files with following dates.

  Two of quite a few files in this location:
  -rwxr-xr-x 1 harry nfsu 1768 2014-07-22 20:18 scripts/perl/getad
  -rwxr-xr-x 1 harry nfsu 6429 2014-07-22 20:18 scripts/perl/rnami.pl

To my eye, those dates fall within the targetting files

Now create our targeting files with target date inbetween

  touch NewerThan -t 201406141130
  
  touch ButNotNewerThan -t 201408141130

Now check my targeting files:

  ls -l NewerThan ButNotNewerThan 
  -rw-r--r-- 1 harry nfsu 0 2014-08-14 11:30 ButNotNewerThan
  -rw-r--r-- 1 harry nfsu 0 2014-06-14 11:30 NewerThan

Ok, now try it up

  find scripts/perl/ -cnewer NewerThan -and ! -cnewer ButNotNewerThan

  (Nada)

Where is the flaw?




More information about the openindiana-discuss mailing list