BASH   55

backup24 sh

Guest on 15th May 2022 04:47:31 PM

  1. #!/bin/bash
  2.  
  3. date=`date +%Y%m%d`
  4. backuppath=/usb/backup
  5.  
  6. dir=/home/milindfo/test
  7. cmd=`find $dir -mtime 0`
  8. tar czPf $backuppath/`basename $dir`-$date.tar.gz $cmd

Raw Paste


Login or Register to edit or fork this paste. It's free.