hughfenghen.github.io
hughfenghen.github.io copied to clipboard
MacOS 手动备份用户目录
因一些奇怪的原因,需要格盘才能重装系统,所以需要备份大量文件。 但 cp 命令 copy 文件到另一台电脑或硬盘非常的缓慢。
前端专属命令。。。
tar --exclude='*/node_modules/*' -zcvf <备份文件名字>.tgz <源文件夹名>
打包过程速度很快,copy 单个文件的速度也非常快。
另外,过滤 .pnpm, .cache, temp 等目录,还能更快。
tar 命令: https://www.runoob.com/linux/linux-comm-tar.html