结果

结果

我正在尝试确定 Mac OS X 上带有 Mac OS Extended (Journaled) (HFS+) 的常规文件(而不是符号链接等)的所有属性。这是我当前的列表:

Compression State
Unix Permissions
User
Group
extended attributes (xattr)
last access time (stat)
last data modification (stat)
last file status change (stat)
archived flag (chflags)
opaque flag (chflags)
nodump flag (chflags)
sappend flag (chflags)
schg flag (chflags)
uappend flag (chflags)
uchg flag (chflags)
hidden flag (chflags)
ACLs
File Type Code
File Creator Code
Resource Fork
Hard Link Count

有人能想到我可能遗漏的其他属性吗?

答案1

准备

使用OS X Mountain Lion:

macbookpro08-centrim:~ gjp22$ ls /Volumes/spare/touched.txt
ls: /Volumes/spare/touched.txt: No such file or directory
macbookpro08-centrim:~ gjp22$ touch /Volumes/spare/touched.txt

结果

谢谢文件Xray

macbookpro08-centrim:~ gjp22$ sudo fileXray /Volumes/spare/touched.txt 
Password:
  path                 = spare:/touched.txt
# Catalog File Thread Record
# Record 43 in node 1 beginning at 512-byte sector 0x9040
  parentID             = 2
  nodeName             = touched.txt
# Catalog File Record
# Record 15 in node 19 beginning at 512-byte sector 0x90d0
  type                 = file
  file ID              = 76230
  flags                = 0000000010000010
                       . File has a thread record in the catalog.
                       . File has date-added stored in Finder Info.
  reserved1            = 0
  createDate           = Wed Dec 26 01:45:51 2012
  contentModDate       = Wed Dec 26 01:45:51 2012
  attributeModDate     = Wed Dec 26 01:45:51 2012
  accessDate           = Wed Dec 26 01:45:51 2012
  backupDate           = 0
  # BSD Info
  ownerID              = 19236 (gjp22)
  groupID              = 20 (staff)
  adminFlags           = 00000000
  ownerFlags           = 00000000
  fileMode             = -rw-r--r-- 
  linkCount            = 1
  textEncoding         = 0
  reserved2            = 0
  # Finder Info
  fdType               = 0
  fdCreator            = 0`
  fdFlags              = 0000000000000000
  fdLocation           = (v = 0, h = 0)
  opaque               = 0
  # Extended Finder Info
  reserved1            = 0
  date_added           = Wed Dec 26 01:45:51 2012
  extended_flags       = 0000000000000000
  reserved2            = 0
  reserved3            = 0
  # Data Fork
  logicalSize          = 0 bytes
  # Resource Fork
  logicalSize          = 0 bytes

笔记

添加日期

FndrExtendedDirInfo并且FndrExtendedFileInfo——两者都包括date_added——出现Apple 为 Mac OS X 10.7 开源(xnu-1699.22.73)但不是 10.6.8。

其他领域

对于保留的字段,我不知道现在或将来会有什么用途。

对于 OS X 10.8.2

http://www.opensource.apple.com/source/xnu/xnu-2050.18.24/bsd/hfs/hfs_format.h

... 描述 HFS 和 HFS Plus 卷的磁盘格式。...

相关内容