Annotation of wpscripts/oldzayavki/oldzayavki.sh, Revision 1.2
1.1 yason 1: #!/bin/sh
2:
3:
4:
5: case ${1} in
6: -w)
7: # wideprint, list
8: case ${2} in
1.2 ! yason 9: maket)
! 10: echo "Listing old zayavki on maket"
! 11: /usr/bin/find /mnt/maket/*/zayavki -type f -ctime +14d -exec ls -lh {} \;
1.1 yason 12: ;;
13: *)
1.2 ! yason 14: echo "Usage: $0 <-w[r] | -e[r]> maket"
1.1 yason 15: echo "Be careful with -wr and -er keys. 'r' stands for \"remove\" here"
16: esac
17: ;;
18:
19: # wideprint list all
20:
21: -W)
22: # wideprint, list
1.2 ! yason 23: echo "Listing old zayavki"
! 24: /usr/bin/find /mnt/maket/*/zayavki -type f -ctime +14d -exec ls -lh {} \;
1.1 yason 25: ;;
26: -wr)
27: # wideprint, remove
28: case ${2} in
1.2 ! yason 29: maket)
! 30: echo "Removing old zayavki on maket"
! 31: /usr/bin/find /mnt/maket/*/zayavki -type f \! -name "*.rar" -ctime +14d -print -exec rm {} \;
1.1 yason 32: ;;
33: *)
1.2 ! yason 34: echo "Usage: $0 <-w[r] | -e[r]> maket"
1.1 yason 35: echo "Be careful with -wr and -er keys. 'r' stands for \"remove\" here"
36: esac
37: ;;
38:
1.2 ! yason 39: #-Wr)
! 40: # # wideprint, remove ALL
! 41: # echo "Removing old zayavki on V*"
! 42: # /usr/bin/find /V[1-5]/*/zayavki -type f \! -name "*.rar" -ctime +14d -print -exec rm {} \;
! 43: # ;;
! 44: #-WR)
! 45: # # wideprint, remove ALL
! 46: # echo "Removing old zayavki on V*"
! 47: # /usr/bin/find /V[1-5]/*/zayavki -type f -ctime +14d -print -exec rm {} \;
! 48: # ;;
1.1 yason 49:
50: #
51: # EPD
52: -e)
53: # epd, list
54: case ${2} in
1.2 ! yason 55: maket)
! 56: echo "Listing old EPD zayavki on maket"
! 57: /usr/bin/find /mnt/maket/*/epd_zayavki -type f -ctime +14d -exec ls -lh {} \;
1.1 yason 58: ;;
59: *)
1.2 ! yason 60: echo "Usage: $0 <-w[r] | -e[r]> maket"
1.1 yason 61: echo "Be careful with -wr and -er keys. 'r' stands for \"remove\" here"
62: esac
63: ;;
64: -er)
65: # warn user
66: echo "* Please stop now and think twice. *"
67:
68: echo "Have you backed up all those EPD files before deleting them? epickup(1) can do it for you."
69: echo "Hit <Ctrl-C> to cancel or <Enter> to continue removing EPD files."
70: read A
71:
72: # epd, remove
73: case ${2} in
1.2 ! yason 74: maket)
! 75: echo "Removing old EPD zayavki on maket"
! 76: /usr/bin/find /mnt/maket/*/epd_zayavki -type f \! -name "*.rar" -ctime +14d -print -exec rm {} \;
1.1 yason 77: ;;
78: *)
1.2 ! yason 79: echo "Usage: $0 <-w[r] | -e[r]> maket"
1.1 yason 80: echo "Be careful with -wr and -er keys. 'r' stands for \"remove\" here"
81: esac
82: ;;
83:
84: *)
1.2 ! yason 85: echo "Usage: $0 <-w[r] | -e[r]> maket"
1.1 yason 86: echo "Be careful with -wr and -er keys. 'r' stands for \"remove\" here"
87:
88: esac
89:
CVSweb