Parent Directory | Revision Log
added -prune to find to avoid taking into consideration those files already moved into archive
1 | ccflib | 1.1 | #!/bin/bash |
2 | # | ||
3 | # archive_valid_ccf_lists.sh | ||
4 | # | ||
5 | # Script to archive the lists produced in the valid_ccf directory. | ||
6 | # | ||
7 | # To find out which files have to be deleted we use find -mtime +15 | ||
8 | # | ||
9 | # (c) ESA 2016 | ||
10 | # | ||
11 | ccflib | 1.2 | # $Id: archive_valid_ccf_lists.sh,v 1.1 2016/03/23 15:38:45 ccflib Exp $ |
12 | ccflib | 1.1 | |
13 | |||
14 | |||
15 | # Some initialisation | ||
16 | |||
17 | where=`pwd` | ||
18 | |||
19 | VALID_CCF="/home/ccflib/valid_ccf" | ||
20 | VALID_CCF_ARCHIVE="${VALID_CCF}/archived" | ||
21 | |||
22 | |||
23 | |||
24 | ccflib | 1.2 | for file in `find $VALID_CCF -prune -type f -name "all_ccfs*" -mtime +15 -exec ls -1 {} \;` |
25 | ccflib | 1.1 | do |
26 | mv $file ${VALID_CCF_ARCHIVE}/ | ||
27 | done | ||
28 | |||
29 | ccflib | 1.2 | for file in `find $VALID_CCF -prune -type f -name "xsaobslog_*" -mtime +15 -exec ls -1 {} \;` |
30 | ccflib | 1.1 | do |
31 | mv $file ${VALID_CCF_ARCHIVE}/ | ||
32 | done | ||
33 |
ViewVC Help | |
Powered by ViewVC 1.1.27 |