Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.64 KB | None | 0 0
  1. [root@mail scripts]# cat respmail
  2. DATE=`date +"%F.%Hh.%Mm.%Ss"`
  3. DIR="/backup/mail/02Server-$DATE"
  4. mkdir $DIR
  5. tar czvf "$DIR/$DATE.tar.gz" "/var/mail"
  6. [root@mail scripts]# ls /backup/mail
  7. 02Server-2011-06-30.12h.07m.07s  02Server-2011-06-30.12h.17m.56s
  8. 02Server-2011-06-30.12h.12m.41s
  9. [root@mail scripts]# ls /backup/mail -lh
  10. total 24K
  11. drwxr-xr-x 2 root root 4.0K Jun 30 12:07 02Server-2011-06-30.12h.07m.07s
  12. drwxr-xr-x 2 root root 4.0K Jun 30 12:12 02Server-2011-06-30.12h.12m.41s
  13. drwxr-xr-x 2 root root 4.0K Jun 30 12:17 02Server-2011-06-30.12h.17m.56s
  14. [root@mail scripts]# ls /backup/mail/02Server-2011-06-30.12h.07m.07s/
  15. [root@mail scripts]#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement