Dotfiles 备份脚本
发表于|更新于|代码展示
1 | cloud_repo='' |
文章作者: 梁栋烨
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 他说!
相关推荐

2026-04-05
Butterfly 说说脚本
12345678910111213141516171819202122232425nofile() { touch source/_data/shuoshuo.yml echo >> source/_data/shuoshuo.yml echo "- date: $(date +'%Y-%m-%d %H:%M:%S')" >> source/_data/shuoshuo.yml echo " key: 1" >> source/_data/shuoshuo.yml echo " content: $@" >> source/_data/shuoshuo.yml}hadfile() { key=$(grep -oE 'key: [0-9]+' source/_data/shuoshuo.yml | \ tail -n 1 | \ sed &...

2026-04-06
下载 Ubuntu 壁纸脚本
123456789filename=$(curl https://mirrors.tuna.tsinghua.edu.cn/ubuntu/pool/main/u/ubuntu-wallpapers/ | \ grep -oE "ubuntu-wallpapers_.*?.orig.tar.gz" | \ tail -n 1)wget https://mirrors.tuna.tsinghua.edu.cn/ubuntu/pool/main/u/ubuntu-wallpapers/${filename} && \ mkdir ubuntu-wallpapers temp && \ tar -xvf $filename -C temp && \ find temp -type f (\ -name "*.jpg" -o -name "*.png" \) -exec mv {} ubuntu-wallpaper...

2026-04-06
Butterfly 友链存活脚本
1234567file=source/_data/link.yml[[ -f $file ]] && \ grep -o 'https://[^/]*' $file | \ sed 's|https://||' | \ xargs -I {} sh -c 'ping $1 -c 4 > /dev/null && echo "$1 存活!" || echo "$1 死亡!"' _ {}

2026-04-07
Shell 写的大语言模型客户端
123456789101112131415161718rm -rf ./history.jsonread -p "请输入 OpenAI API URL:" OpenAI_APIread -p "请输入 OpenAI API Key:" API_KEYread -p "请输入模型名称:" MODEL_NAME[[ -f "./history.json" ]] || echo "{\"model\": \"$MODEL_NAME\",\"messages\": [{\"role\": \"system\", \"content\": \"回答一句话,越简短越好,不需要 Markdown 和换行,要标点符号!\"}],\"stream\": false}" > ./history.js...

2026-04-05
下载文件分类脚本
123456789101112131415161718192021222324252627282930313233[[ -d ~/Documents ]] && find ~/Download -type f \( \ -name "*.txt" -o \ -name "*.docx" -o \ -name "*.doc" -o \ -name "*.xlsx" -o \ -name "*.xls" -o \ -name "*.ppt" -o \ -name "*.pptx" -o \ -name "*.pdf" \ \) -exec mv {} ~/Documents/ \;[[ -d ~/Pictures ]] && find ~/Download -type f \( \ -name "*.jpg...
评论
公告
编程爱好者,养龟业余户。不定期更新个人生活、深度思考、游戏图文、代码展示等。希望在未来的每一天里,我们无限进步!
