/ Published in: Bash
Script using tar to backup new file created 1 day before
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/bin/sh YESTERDAY='date +%D -date=-1day' ( cd /dir/ && tar --create --file=- --newer=$YESTERDAY . ) | ( cd /dest_dir/ && tar xvpf - )