Changeset 56

Show
Ignore:
Timestamp:
12/02/09 15:56:29 (4 years ago)
Author:
depesz
Message:

if logdir is symlink, version without / at the end doesnt work

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tools/archive_logs.sh

    r55 r56  
    240240# Using ls could be an option, but it tends to write messages to STDERR if 
    241241# there are no matching files - not something that we would like. 
    242 find "$LOG_DIRECTORY" -type f \( -name 'postgresql-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].log' -o -name 'postgresql-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]_[0-9][0-9][0-9][0-9][0-9][0-9].log' \) -print | \ 
     242find "$LOG_DIRECTORY"/ -type f \( -name 'postgresql-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].log' -o -name 'postgresql-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]_[0-9][0-9][0-9][0-9][0-9][0-9].log' \) -print | \ 
    243243    egrep "^${LOG_DIRECTORY}/postgresql-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9](_[0-9][0-9][0-9][0-9][0-9][0-9])?.log" | \ 
    244244    sort | \