Skip to content

Instantly share code, notes, and snippets.

@Eggsmemory
Eggsmemory / transfer-between-drives.ipynb
Created November 29, 2020 06:24
Transfer between drives
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Eggsmemory
Eggsmemory / mega-to-google-drive-chinese-version.ipynb
Last active November 15, 2022 07:09
Mega-to-Google-Drive-Chinese-Version.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
tail –f nohup.txt
@Eggsmemory
Eggsmemory / nohup指令
Created November 22, 2020 06:22
關閉SSH,指令繼續執行
nohup your_command &
//-X -S請使用大寫字母
screen -ls
screen -X -S 進程編號 quit
//上傳
rclone copy VPS路徑 雲端硬碟路徑
//下載
rclone copy 雲端硬碟路徑 VPS路徑
上傳圖片到OneDrive
點擊共用
取消編輯權限(避免檔案被其他用戶刪除)
複製連結
開啟連結
檢視原始影像
複製原始影像連結
獲取原始影像連結
https://onedrive.gimhoy.com/
//修改wp-config.php
//加入以下兩行內容
define('WP_HOME','你的域名');
define('WP_SITEURL','你的域名');
//修改functions.php
//加入以下兩行內容
update_option('siteurl','你的域名');
UPDATE wp_options SET option_value = REPLACE(option_value, '原域名', '新域名') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = REPLACE (post_content, '原域名', '新域名');
UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, '原域名,'新域名');
UPDATE wp_comments SET comment_content = REPLACE (comment_content, '原域名', '新域名');
UPDATE wp_comments SET comment_author_url = REPLACE (comment_author_url, '原域名,'新域名');
UPDATE wp_posts SET guid = REPLACE (guid, '原域名', '新域名') WHERE post_type = 'attachment';
進入 /data/wwwroot/www.你的域名,刪除wordpress安裝檔
將/data/wwwroot/www.你的域名/wordpress檔案移動到/data/wwwroot/www.你的域名
刪除wordpress資料夾
如果會程式可以用mv、rm rf指令直接在Xshell操作,這裡是以新手方式教學