0

I have a list of files like:
(in general, it's of the format /data/logs/var_YYYYMMDDHHMMSS.log)

/data/logs/var_20121002103531.log
/data/logs/var_20121002104215.log
/data/logs/var_20121002120001.log

I've tried in vain to list all the files which DO NOT have 12 as HH.
i.e. input:

/data/logs/var_20121002103531.log
/data/logs/var_20121002104215.log
/data/logs/var_20121002120001.log  # THIS IS TO BE OMITTED
/data/logs/var_20121002140001.log

Required Output:

/data/logs/var_20121002103531.log
/data/logs/var_20121002104215.log
/data/logs/var_20121002140001.log

I tried

ls -1tr /data/logs/var_20121002^[12]
ls -1tr /data/logs/var_20121002![11]

but, not getting what i expect.

Can someone please pinpoint where I'm going wrong?

Florent
  • 12,310
  • 10
  • 49
  • 58

0 Answers0