mirror of
https://github.com/kejilion/sh.git
synced 2025-08-17 20:41:11 +08:00
Update beifen.sh
This commit is contained in:
parent
41d6d6838b
commit
7ef3598e70
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
|||
cd /home/ && tar czvf web_$(date +"%Y%m%d%H%M%S").tar.gz web
|
||||
|
||||
# Transfer the tar archive to another VPS
|
||||
cd /home/ && ls -t /home/*.tar.gz | head -1 | xargs -I {} sshpass -p 123456 scp -P 22 {} root@0.0.0.0:/home/
|
||||
cd /home/ && ls -t /home/*.tar.gz | head -1 | xargs -I {} sshpass -p 123456 scp -o StrictHostKeyChecking=no -P 22 {} root@0.0.0.0:/home/
|
||||
|
||||
# Keep only 5 tar archives and delete the rest
|
||||
cd /home/ && ls -t /home/*.tar.gz | tail -n +4 | xargs -I {} rm {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue