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

Re: gzip based on file date



Hello Lance

Have a look at bash's built-in functions. I suggest using "test". I qoute from the bash manual page:

              file1 -nt file2
                     True if file1 is newer (according to modifi­
                     cation date) than file2.
              file1 -ot file2
                     True if file1 is older than file2.

Other than comparing two files, you probably have to use string comparison in combination with command substitution. "date --help" should give you some ideas for that.

Hope this helps.
Sven


Reply to: