Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. DOWNLOADSPATH=`echo ~/Downloads`
  4. BKUP_TODAY=`date '+bkup%Y-%m-%d'`
  5.  
  6. #echo ${DOWNLOADSPATH}/${BKUP_TODAY}
  7. if [ ! -d ${DOWNLOADSPATH}/${BKUP_TODAY} ]; then
  8. mkdir ${DOWNLOADSPATH}/${BKUP_TODAY}
  9. fi
  10.  
  11. cd ${DOWNLOADSPATH}
  12. mv * ${BKUP_TODAY} 2>/dev/null
  13. mv ${BKUP_TODAY}/bkup* . 2>/dev/null
  14.  
  15. echo back up downloads files to ${BKUP_TODAY}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement