目前此屌采用 @renzuo 建议并同时参考
https://dotfiles.github.io/ 对 ~ 目录下的~/bin
.bashrc .vim 文件进行改造,并使用网盘客户端同步备份。但设置还有 /etc ~/.config ~/.local /opt
下的各种工具等等,甚至因为要应对硬盘坏,把一些工具的二进制文件,直接没节操地放进仓库,
当然,一些 10MB 的工具在同步的时候都感觉很慢(用 dropbox,和 megasync),但比起重新找,又找到不对的版本,还是省下些心情。
~/.dotfiles
├── .bash/
├── .bash_logout
├── .bashrc
├── bin/
├── .debris/
├── .git/
├── .git-completion.bash
├── .gitconfig
├── .git-prompt.sh
├── .i3/
├── .poliporc
├── .profile
├── .ssh/
├── .vim/
├── .vimrc
├── .vimrc_bak
├── .xinputrc
├── .xinputrc_bak
└── .xprofile_bak
<code filename="dotlink">
#!/bin/bash
dotbase=`readlink -f ~/src/dotfiles`
rm -f ~/.dotfiles
ln -sv $dotbase ~/.dotfiles
ls -A $dotbase |while read item;
do
ln -vs "$dotbase/$item" ~/
done
rm ~/.git
</code>
> --
> You received this message because you are subscribed to the Google Groups
> "Chengdu GNU/Linux User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
cdlug_communi...@googlegroups.com.
> To post to this group, send email to
cdlug_c...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/cdlug_community.
> For more options, visit
https://groups.google.com/d/optout.
>
--
qingxianhao