如何在bashshell中将一个目录的时间戳信息复制到另一个目录
在bashshell中,如何将一个目录的时间戳信息复制到另一个目录 谢谢你的帮助如何在bashshell中将一个目录的时间戳信息复制到另一个目录,bash,shell,Bash,Shell,在bashshell中,如何将一个目录的时间戳信息复制到另一个目录 谢谢你的帮助 cd /path/to/dir1 && find . -exec touch --reference={} /path/to/dir2/{} \; 这将从/path/to/dir1到/path/to/dir2中的所有文件、目录等复制时间戳信息,前提是它们具有相同的名称 这将从/path/to/dir1到/path/to/dir2中的所有文件、目录等复制时间戳信息,如果它们有相同的名称。touch-
cd /path/to/dir1 &&
find . -exec touch --reference={} /path/to/dir2/{} \;
这将从/path/to/dir1
到/path/to/dir2
中的所有文件、目录等复制时间戳信息,前提是它们具有相同的名称
这将从
/path/to/dir1
到/path/to/dir2
中的所有文件、目录等复制时间戳信息,如果它们有相同的名称。touch-r source dir target dirtouch-r source dir target dir什么操作系统和文件系统?@nmichaels:让我们说一下我的macbook pro的标准MacOS。什么操作系统和文件系统?@nmichaels:让我们说一下我的macbook pro的标准MacOS。