mac命令行复制文件权限问题
mac osx系统 我在一个目录下执行了下面的操作
cp -R backend/ api
ls -al
drwxr-xr-x@ 9 root admin 306 7 15 09:46 api
drwxr-xr-x@ 10 xinyue admin 340 7 15 10:40 backend
复制之后发现 他是属于root的,如何让复制后也和上面的backend一样属于xinyue
狼と香辛料
10 years ago
Answers
cp -Rp backend/ api
# man cp
-p Cause cp to preserve the following attributes of each source file in the copy: modification time, access time, file flags, file mode, user ID, and group ID, as allowed by
permissions. Access Control Lists (ACLs) and Extended Attributes (EAs), including resource forks, will also be preserved.
无节操D红白姬
answered 10 years ago