티스토리 뷰
function fmt_date {
# usage : fmt_date 7 YYYY MM DD
OFFSET=$((15+24*($1-1))); shift
for I in $*
do
case "$I" in
"YYYY")
printf `TZ=KST+$OFFSET date +%Y`
;;
"YY")
printf `TZ=KST+$OFFSET date +%y`
;;
"MM")
printf `TZ=KST+$OFFSET date +%m`
;;
"DD")
printf `TZ=KST+$OFFSET date +%d`
;;
"D")
printf `TZ=KST+$OFFSET date +"%d/10" | bc`
;;
*)
printf "$I"
esac
done
}
for DIR in /APP/ems/ems50/auto/agent_log/ /APP/ems/ems50/auto/content_infos/ /APP/ems/ems50/auto/error/ /APP/ems/ems50/auto/long
_mapping/ /APP/ems/ems50/auto/mqueue/ /APP/ems/ems50/auto/spool/ /APP/ems/ems50/auto/spool_infos/ /APP/ems/ems50/auto/trace/ /AP
P/ems/ems50/auto/drive_check/ /APP/ems/ems50/jupiter/agent_log/ /APP/ems/ems50/jupiter/content_infos/ /APP/ems/ems50/jupiter/spo
ol_infos/ /APP/ems/ems50/jupiter/trace/ /APP/ems/ems50/jupiter/drive_check/ /APP/ems/ems50/market/htdocs/content/ /APP/ems/ems50
/market/htdocs/content_infos/ /APP/ems/ems50/market/htdocs/spool/ /APP/ems/ems50/market/htdocs/spool_infos/ /APP/ems/ems50/FTPRo
ot/backup/ /APP/ems/ems50/FTPRoot/error/ /APP/ems/ems50/auto/log/ /APP/ems/ems50/auto/log_process/ /APP/ems/ems50/auto/report/ /
APP/ems/ems50/jupiter/log/ /APP/ems/ems50/jupiter/log_process/ /APP/ems/ems50/jupiter/spool/ /APP/ems/ems50/FTPRoot/temp/ /APP/e
ms/ems50/FTPRoot/work/
do
cd $DIR/OLD
ls -al *.zip > `fmt_date 0 YY MM DD`.lst;
save -s openbk -b FiveYearV -l full -w '5 year' -y '5 year' *.zip; \rm *zip
done
'Linux' 카테고리의 다른 글
AIX서버 서버상태확인 (0) | 2012.04.20 |
---|---|
yum 설치하기 (0) | 2012.02.07 |
리눅스 세션 계속 유지하기 (0) | 2011.09.19 |
Apache log4j.properties (0) | 2011.08.01 |
[Linux] Shell프로그램 Crontab으로 실행하기 (0) | 2011.04.13 |
- Total
- Today
- Yesterday
- 테이블
- 자동차
- 설정
- IP
- 데이터
- server
- 리눅스
- DATABASE
- sql
- DB
- mssql
- table
- 윈도우
- MySQL
- eclipse
- delete
- java
- Linux
- 서버
- 오라클
- apache
- user
- 파일
- Shell
- Windows
- Oracle
- 백업
- select
- Toad
- tomcat
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |