We assume /source/dir is a filesystem, if there are other filesystems under /source/dir they will also be copied to /destination/dir cd /source/dir tar -cf - . | ( cd /destination/dir ; tar -xpvf - )
copy file using tar
最新推荐文章于 2025-11-09 11:36:02 发布
本文介绍了一种使用tar命令从源目录(source/dir)复制文件及子文件系统到目标目录(destination/dir)的方法。通过在源目录下运行tar命令进行打包,并在目标目录下解包的方式实现文件系统的完整迁移。
978

被折叠的 条评论
为什么被折叠?



