사용자 도구

사이트 도구


wiki:programming:shell

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

다음 판
이전 판
wiki:programming:shell [2022/03/14 13:56]
dhan 만듦
wiki:programming:shell [2023/02/10 18:23] (현재)
dhan
줄 1: 줄 1:
 ====== 쉘 프로그래밍 ====== ====== 쉘 프로그래밍 ======
 <WRAP left notice 80%> <WRAP left notice 80%>
-  * description : 주레피 현황(서명)+  * description : 쉘 프로그래밍 예정
   * author      : 주레피   * author      : 주레피
   * email       : dhan@repia.com   * email       : dhan@repia.com
줄 9: 줄 9:
  
 ===== Case Study ===== ===== Case Study =====
 +  * [[wiki:programming:shell:bash|bash(배시, 본어게인쉘)]]
 +
 +  * [[https://korbillgates.tistory.com/132|쉘 스크립트로 파일 사이즈 구하기]]
 +
 ==== 백업 스크립트 ==== ==== 백업 스크립트 ====
 <code sh> <code sh>
줄 24: 줄 28:
 mv "${WIKI_BACKUP_SOURCE}"/dw-backup-"${YESTERDAY}"-*.tar "${WIKI_BACKUP_TARGET}" mv "${WIKI_BACKUP_SOURCE}"/dw-backup-"${YESTERDAY}"-*.tar "${WIKI_BACKUP_TARGET}"
  
-#2. 200일 이전 데이터 삭제 +#2. 180일 이전 데이터 삭제 
-echo "find ${WIKI_BACKUP_TARGET} -name dw*tar -mtime +200 -exec rm -f {} \;" >> backup.log+echo "find ${WIKI_BACKUP_TARGET} -name dw*tar -mtime +180 -exec rm -f {} \;" >> backup.log
 find "${WIKI_BACKUP_TARGET}" -name dw*tar -mtime +180 -exec rm -f {} \; find "${WIKI_BACKUP_TARGET}" -name dw*tar -mtime +180 -exec rm -f {} \;
 #find "${WIKI_BACKUP_TARGET}" -name dw*tar -mtime +180 -ls #find "${WIKI_BACKUP_TARGET}" -name dw*tar -mtime +180 -ls
 </code> </code>
 +
 +===== Example =====
 +
  
 {{tag>주레피 백업스크립트 쉘프로그래밍 sh}} {{tag>주레피 백업스크립트 쉘프로그래밍 sh}}
  
/volume1/web/dokuwiki/data/attic/wiki/programming/shell.1647233813.txt.gz · 마지막으로 수정됨: 2022/03/14 13:56 저자 dhan