mac os 可执行位如何在 Windows 中保留?
我有两台 Mac,第三台 Windows 计算机上有一个共享文件夹。如果我执行以下操作:
- 将可执行控制台应用程序(不是 .app 文件 - 单个可执行文件)从 Mac 1 复制到 Windows 计算机
- Windows 计算机上的 Zip 可执行文件
- 将新的 zip 文件复制到 Mac 2 并解压缩
附带的文件zip 文件仍然可执行。鉴于 Windows 权限系统完全不同并且实际上没有可执行文件的概念,如何保留该文件的“可执行性”性质?
I have two Macs, and a shared folder on a third Windows computer. If I do something like this:
- Copy an executable console application (not a .app file - a single file which is executable) from Mac 1 to Windows machine
- Zip executable on Windows machine
- Copy new zip file to Mac 2 and unzip
The file that comes out of the zip file is still executable. How is the "executable-ness" nature of that file preserved, given that windows permissions system is totally different and doesn't really have the concept of executable files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
OSX 应用程序是文件夹,而不是文件。将文件夹复制到没有可执行位表示的文件系统时,OSX 会为缺少的属性创建隐藏文件。压缩应用程序是压缩文件夹,包括其隐藏的子文件夹。复制回时,OSX 将从隐藏文件中重新创建丢失的属性。
这些隐藏文件夹称为 ._.OriginalName
EDIT
经过评论部分的广泛讨论,这里有一些关于简单可执行文件(执行权限集)而不是 *.app 文件夹(本机)的信息OSX 应用程序)
._.OriginalName
元数据存储与文件解耦,OSX Apps are folders, not files. When copying folders to a file system, that doesn't have executable bit representation, OSX creates hidden files for the missing attributes. Zipping the App is zipping a folder, including its hidden subfolders. On copy back, OSX will recreate the missing properties from the hidden files.
These hidden folders are called ._.OriginalName
EDIT
After quite extensive discussion in the comments sections, here is a bit of info about simple executable files (execute permission set) as opposed to *.app folders (native OSX applications)
._.OriginalName
metadata store is decoupled from the file by the rename