Last active
February 23, 2023 09:48
-
-
Save sarkrui/cb3e8a879b200738a75f8190509aee14 to your computer and use it in GitHub Desktop.
Revisions
-
Sark revised this gist
Aug 14, 2020 . No changes.There are no files selected for viewing
-
Sark revised this gist
Jul 27, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ mkdir ~/.scripts #wget backup script wget --no-check-certificate https://gist.github.com/sarkrui/cb3e8a879b200738a75f8190509aee14/raw/WeChat_backup.sh #making it execuatable chmod +x WeChat_backup.sh -
Sark revised this gist
Jul 21, 2020 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,8 +4,7 @@ mkdir ~/.scripts #wget backup script wget --no-check-certificate -P https://gist.github.com/sarkrui/cb3e8a879b200738a75f8190509aee14/raw/WeChat_backup.sh #making it execuatable chmod +x WeChat_backup.sh -
Sark revised this gist
Jul 7, 2020 . No changes.There are no files selected for viewing
-
Sark renamed this gist
Jun 5, 2020 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Sark revised this gist
Jun 5, 2020 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,5 +20,6 @@ echo "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n*/~/.sc #install new cron file crontab mycron rm mycron echo "Crontab schedule created!" -
Sark revised this gist
Jun 5, 2020 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,8 +13,9 @@ chmod +x WeChat_backup.sh crontab -l > mycron #echo new cron into cron file # 0 2 * * * crontab = Scheduled at evryday at 01:30 # 2>&1 indicates that the standard error (2>) is redirected to the same file descriptor that is pointed by standard output (&1). echo "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n*/~/.scripts && ./WeChat_backup.sh > ~/.scripts/log/WeChat_backup.log 2>&1" >> mycron #install new cron file crontab mycron -
Sark revised this gist
Jun 5, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ chmod +x WeChat_backup.sh crontab -l > mycron #echo new cron into cron file # 30 1 * * * crontab = Scheduled at evryday at 01:30 echo "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n*/30 1 * * * cd ~/.scripts && ./test.sh" >> mycron #install new cron file -
Sark revised this gist
Jun 5, 2020 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,9 @@ chmod +x WeChat_backup.sh #write out current crontab crontab -l > mycron #echo new cron into cron file #30 1 * * * crontab = Scheduled at evryday at 01:30 echo "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n*/30 1 * * * cd ~/.scripts && ./test.sh" >> mycron #install new cron file crontab mycron -
Sark revised this gist
Jun 5, 2020 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,9 +12,10 @@ chmod +x WeChat_backup.sh #write out current crontab crontab -l > mycron #echo new cron into cron file echo "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n*/1 * * * * cd ~/.scripts && ./test.sh" >> mycron #install new cron file crontab mycron rm mycron -
Sark revised this gist
Jun 5, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ chmod +x WeChat_backup.sh #write out current crontab crontab -l > mycron #echo new cron into cron file echo "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \n */1 * * * * cd ~/.scripts && ./test.sh" >> mycron #install new cron file crontab mycron -
Sark revised this gist
Jun 5, 2020 . 2 changed files with 21 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ #!/bin/bash #change working directory to Desktop cd ~/Desktop This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ #!/bin/bash #I usually put bash scripts under this folder mkdir ~/.scripts #wget backup script wget --no-check-certificate -P ~/.scripts/ https://gist.github.com/sarkrui/cb3e8a879b200738a75f8190509aee14/raw/e68ccee31e213155f857d71e40cf71e8185cfa0c/WeChat_backup.sh #making it execuatable chmod +x WeChat_backup.sh #write out current crontab crontab -l > mycron #echo new cron into cron file echo "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \n */1 * * * * cd /Users/p.xing/.scripts && ./test.sh" >> mycron #install new cron file crontab mycron rm mycron -
Sark revised this gist
May 28, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ cd ~/Desktop rm -f WeChat_history* # generate the new updated tar -vczf ~/Desktop/WeChat_history$(date +%F_%R).tgz ~/Library/Containers/com.tencent.xinWeChat/Data/Library/Application\ Support/com.tencent.xinWeChat # shall config rclone at the first place # push to Google Drive name Team, (Google Team Drive has 5T storage) -
Sark renamed this gist
May 26, 2020 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Sark created this gist
May 20, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ #! /bin/bash #change working directory to Desktop cd ~/Desktop # remove any previously existing compressed files rm -f WeChat_history* # generate the new updated tar -vczf ~/Desktop/WeChat_history$(date +%F_%R).tgz /Users/p.xing/Library/Containers/com.tencent.xinWeChat/Data/Library/Application\ Support/com.tencent.xinWeChat # shall config rclone at the first place # push to Google Drive name Team, (Google Team Drive has 5T storage) # under the root (/) directory, # and shows progress by -P rclone sync ~/Desktop/WeChat_history* Team:/ -P echo "Done!"