「拡張属性」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(英語版から)
タグ: リダイレクト解消
(同期)
 
(2人の利用者による、間の10版が非表示)
1行目: 1行目:
  +
[[Category:ファイルシステム]]
 
[[en:Extended attributes]]
 
[[en:Extended attributes]]
  +
[[ru:Extended attributes]]
  +
{{Related articles start}}
  +
{{Related|ファイルのパーミッションと属性}}
  +
{{Related|ケイパビリティ}}
  +
{{Related articles end}}
   
  +
{{man|7|xattr}} から: "拡張属性は、ファイルやディレクトリと永続的に関連付けられた名前:値のペアです。" 拡張属性には4つのクラスがあります: security、system、trusted、そして user です。
From {{man|7|xattr}}: "Extended attributes are name:value pairs associated
 
permanently with files and directories". There are four extended attribute
 
classes: security, system, trusted and user.
 
   
  +
{{Warning|デフォルトでは、拡張属性は [[cp]]、[[rsync]]、そして他の似たようなプログラムによって保持されません。[[#拡張属性を保持する]] を見てください。}}
{{Warning|By default, extended attributes are not preserved by [[cp]], [[rsync]], and other similar programs, see [[#Preserving extended attributes]].}}
 
   
  +
拡張属性は、[[ケイパビリティ]]を設定する際にも用いられます。
Extended attributes are also used to set [[Capabilities]].
 
   
=== ユーザ拡張属性 ===
+
== ユーザ拡張属性 ==
   
  +
ユーザ拡張属性は、ファイルに関する任意の情報を保存するために使用できます。属性を作成するには:
User extended attributes can be used to store arbitrary information about a
 
file. To create one:
 
   
$ setfattr -n user.checksum -v "3baf9ebce4c664ca8d9e5f6314fb47fb" foo.txt
+
$ setfattr --name=user.checksum --value="3baf9ebce4c664ca8d9e5f6314fb47fb" file.txt
   
  +
拡張属性を表示するには getfattr を使用してください:
Use getfattr to display extended attributes:
 
   
{{hc|$ getfattr -d foo.txt|2=
+
{{hc|1= $ getfattr --encoding=text --dump file.txt|2=
# file: foo.txt
+
# file: file.txt
 
user.checksum="3baf9ebce4c664ca8d9e5f6314fb47fb"
 
user.checksum="3baf9ebce4c664ca8d9e5f6314fb47fb"
 
}}
 
}}
   
  +
拡張属性を削除するには:
Finally, to remove an extended attribute:
 
$ setfattr -x user.checksum foo.txt
 
   
  +
$ setfattr --remove=user.checksum file.txt
some other user xattrs include:
 
* {{ic|user.mime_type}}: helps programs know mimetype and set it with less guesswork.
 
* {{ic|user.charset}}: used by the Apache httpd module [http://0pointer.de/lennart/projects/mod_mime_xattr mod_mime_xattr].
 
* {{ic|user.creator}}: The name of the application that created the file.
 
   
  +
特定の拡張属性を持つファイルを見つけるには、{{AUR|rawhide}} を使ってください:
XDG also proposes a set of standardized xattrs to be used by programs:
 
  +
* {{ic|user.xdg.comment}}: supported by Dolphin and other file managers.
 
  +
$ rh ''/path/to/dir'' '"''XATTR_REGEX''".reea'
* {{ic|user.xdg.origin.url}}: for files downloaded from a url.
 
  +
* {{ic|user.xdg.robots.index}}: "true" if a file is included in indexing, "false" otherwise
 
  +
一部のユーザ拡張属性には以下が含まれています:
* {{ic|user.xdg.robots.backup}}: "true" if a file is included in backup, "false" otherwise
 
  +
  +
* {{ic|user.mime_type}}: プログラムに mimetype を知らせ、推測しなくても良くします。
  +
* {{ic|user.charset}}: Apache httpd モジュール [http://0pointer.de/lennart/projects/mod_mime_xattr mod_mime_xattr] によって使用されます。
  +
* {{ic|user.creator}}: そのファイルを作成したアプリケーションの名前。
  +
  +
XDG は、プログラムによって使用される標準化された拡張属性のセットも提案しています:
  +
  +
* {{ic|user.xdg.comment}}: Dolphin などのファイルマネージャによってサポートされます。
  +
* {{ic|user.xdg.origin.url}}: URL からダウンロードしたファイル用。
  +
* {{ic|user.xdg.robots.index}}: ファイルがインデックスに含まれるならば "true"。さもなくば "false"。
  +
* {{ic|user.xdg.robots.backup}}: ファイルがバックアップに含まれるならば "true"。さもなくば "false"。
 
* {{ic|user.xdg.language}}
 
* {{ic|user.xdg.language}}
 
* {{ic|user.xdg.creator}}
 
* {{ic|user.xdg.creator}}
43行目: 53行目:
 
* {{ic|user.xdg.origin.email.message-id}}
 
* {{ic|user.xdg.origin.email.message-id}}
   
  +
{{ic|user.xdg.tags}} は公式標準規格の一部ではありませんが、一部の人気なプログラムがこの属性のサポートを実装しているので「事実上」の標準となっています ([[#ソフトウェア]] 章を参照)。これは、各ファイルに対してユーザー定義のタグの [[w:ja:Comma-Separated Values|CSV]] リストとして実装されています。
=== 拡張属性を保持する ===
 
  +
  +
== 拡張属性を保持する ==
   
 
{| class="wikitable"
 
{| class="wikitable"
  +
! コマンド || デフォルトで保持するか/必要なフラグ
! Command || Required flag
 
 
|-
 
|-
| {{ic|cp}} || {{ic|1=--preserve=mode,ownership,timestamps,xattr}}
+
| {{ic|cp}} || {{ic|--archive}}/{{ic|1=--preserve=all}}/{{ic|1=--preserve=xattr}}
 
|-
 
|-
| {{ic|mv}} || {{Y|preserves by default<sup>1}}
+
| {{ic|mv}} || {{Yes}}<sup>1</sup>
 
|-
 
|-
| {{ic|tar}} || {{ic|--xattrs}} for creation and {{ic|1=--xattrs-include='*'}} for extraction
+
| {{ic|tar}} || 作成時には {{ic|--xattrs}}、展開時には {{ic|1=--xattrs-include='*'}}
 
|-
 
|-
| {{ic|bsdtar}} || {{ic|-p}} for extraction
+
| {{ic|bsdtar}} || 展開時に {{ic|-p}}
 
|-
 
|-
 
| [[rsync]] || {{ic|-X, --xattrs}}
 
| [[rsync]] || {{ic|-X, --xattrs}}
63行目: 75行目:
 
|-
 
|-
 
| {{pkg|pax}} || {{No}}
 
| {{pkg|pax}} || {{No}}
  +
|-
  +
| [[syncthing]] || [https://docs.syncthing.net/advanced/folder-sync-xattrs syncXattrs] を有効化する必要あり
 
|}
 
|}
   
  +
# mv は、移動先のファイルシステムが拡張属性をサポートしていない場合、何も言わずに拡張属性を破棄します。
# mv silently discards extended attributes when the target file system does not support them.
 
  +
  +
[[テキストエディタ]]で拡張属性を保持するには、保存時に {{man|2|rename}} を使わずファイルを切り詰める/拡張する (truncate) するように設定する必要があります。[https://unix.stackexchange.com/questions/45407]
  +
  +
失いたくないデータに対してバックアップを取るべきであるのと同様に、拡張属性に対しても定期的に[[システムメンテナンス#バックアップ|バックアップ]]を取るべきです。カレントディレクトリ内の全ファイルの拡張属性の完全なバックアップを (再帰的に) 取るには:
  +
  +
$ getfattr --dump --recursive . > backup.txt
  +
  +
バックアップから復元するには:
   
  +
$ setfattr --restore=backup.txt
To preserve extended attributes with [[text editor]]s you need to configure them
 
to truncate files on saving instead of using {{man|2|rename}}. [https://unix.stackexchange.com/questions/45407]
 
   
 
== サポート ==
 
== サポート ==
74行目: 95行目:
 
=== ファイルシステム ===
 
=== ファイルシステム ===
   
  +
[[Ext4]]、[[Btrfs]]、[[ZFS]]、[[XFS]] などの主要な Linux ファイルシステムの全てで拡張属性がサポートされています。カーネルは、拡張属性の名前は 255 バイトまで、値は 64 KiB まで許可しています。しかし、[[Ext4]] と [[Btrfs]] では、拡張属性を "ファイルシステムブロック" 内に収める必要があることから、より小さい制限が課されるかもしれません。
All major Linux file systems including ext, btrfs, zfs, xfs, and more support
 
xattrs. The kernel allows to have xattrs names of up to 255 bytes and values of
 
up to 64 KiB, but ext and btrfs might impose smaller limits, requiring xattrs to
 
be within a "filesystem block".
 
   
  +
[[NTFS]] は代替データストリーム (Alternative Data Streams) を使って user を保存します。マウントオプションの {{ic|user_xattr}} か {{ic|1=streams_interface=xattr}} がデフォルトで使用されるはずです。しかし、マウントオプション {{ic|1=streams_interface=windows}} が使用されている場合は、拡張属性はサポートされないかもしれません。{{pkg|ntfs-3g}} は、FUSE 内での代替データストリームの拡張属性へのマッピングをサポートしています。
[[NTFS]] uses Alternative Data Streams to store user. The mount option
 
{{ic|user_xattr}} or {{ic|1=streams_interface=xattr}} should be used by default. However it
 
might not be supported if mount option {{ic|1=streams_interface=windows}} is used.
 
{{pkg|ntfs-3g}} supports mapping ADS to extended attributes in FUSE.
 
   
  +
[https://www.phoronix.com/news/Linux-5.9-NFS-Server-User-Xattr Linux 5.9 から]、[[NFS]] は拡張属性をサポートしています。
NFS does not currently support xattrs.
 
   
=== ファイルマネージャ ===
+
=== トウェア ===
 
Legend:
 
# Preserved: whether xattrs are preserved when copied or moved.
 
# Tags: whether tags xattrs are supported.
 
   
 
{| class="wikitable"
 
{| class="wikitable"
  +
! アプリケーション
! File manager
 
  +
! サポートされている拡張属性
! Preserved
 
! Tags
+
! 備考
 
|-
 
|-
| [[dolphin]]
+
| [[baloo]]
| {{No}}
+
| {{bc|
  +
user.xdg.tags
  +
user.baloo.rating
  +
}}
 
|
 
|
 
|-
 
|-
  +
| {{pkg|caja}}
| [[thunar]]
 
 
| {{Yes}}
 
| {{Yes}}
  +
| 拡張機能 caja-xattr-tags と caja.eiciel によってサポートされています。
  +
|-
  +
| [[Chromium]]
  +
| {{No|1=https://chromium.googlesource.com/chromium/src/+/a9b4fb70b4318b220deee0da7b1693d16b8ed071}}
  +
| リファラと URL をサポートしていましたが、プライバシーとセキュリティの理由により無効化されました。[https://cve.circl.lu/cve/CVE-2018-20483 CVE-2018-20483] も参照してください。
  +
|-
  +
| {{AUR|brave}}
  +
| {{No|1=https://github.com/brave/brave-browser/issues/2766}}
 
|
 
|
 
|-
 
|-
  +
| [[CURL]]
| {{pkg|caja}}
 
  +
| {{bc|
  +
user.xdg.origin.url
  +
user.xdg.referrer.url
  +
}}
  +
| {{ic|--xattrs}} フラグで有効化されます。
  +
|-
  +
| [[Dolphin]]
  +
| {{bc|
  +
user.baloo.rating
  +
user.xdg.comment
  +
user.xdg.tags
  +
}}
  +
| Dolphin はファイルのタグ付けに対して包括的なサポートを提供しています (コンテキストメニューを使用してファイルにタグを追加したり、ファイルのタグで検索するなどの機能を含む)。タグは {{ic|user.xdg.tags}} 属性に CSV として保存されます。[[Dolphin#ファイルのタグ付け]] も参照。
  +
  +
[https://bugs.kde.org/show_bug.cgi?id=322922]、[https://bugs.kde.org/show_bug.cgi?id=116617]
  +
|-
  +
| [[Dropbox]]
  +
| {{ic|user.com.dropbox.attributes}}
 
|
 
|
| {{Yes}}<sup>1
 
 
|-
 
|-
| [[nautilus]]
+
| [[emacs|emacs-vm]]
  +
| {{No}}
  +
| mbox 拡張属性はリセットされます。
  +
|-
  +
| [[Epiphany]]
  +
| {{No|1=https://gitlab.gnome.org/GNOME/epiphany/-/issues/2165}}
 
|
 
|
  +
|-
  +
| [[Exiftool]]
  +
| {{No|1=https://exiftool.org/forum/index.php?topic=12762}}
 
|
 
|
|}
 
 
# caja: supported by caja-xattr-tags and caja.eiciel extensions.
 
 
=== プログラム ===
 
 
{| class="wikitable"
 
! Application
 
! Supported xattrs
 
! Supported since
 
! Notes
 
 
|-
 
|-
| {{pkg|baloo}}
+
| {{pkg|fd}}
  +
| {{No|1=https://github.com/sharkdp/fd/issues/830}}
| {{ic|user.xdg.tags}}
 
|
+
|
|
 
 
|-
 
|-
  +
| {{pkg|findutils}}
| [[Chromium]]
 
  +
| {{No|1=https://savannah.gnu.org/bugs/?64605}}
| {{ic|user.xdg.origin}},{{ic|user.xdg.referrer}}
 
|
+
|
|
 
 
|-
 
|-
| [[CURL]]
+
| [[Firefox]]
  +
| {{No|1=https://bugzilla.mozilla.org/show_bug.cgi?id=665531}}
|
 
|
+
|
|
 
 
|-
 
|-
  +
| {{AUR|gallery-dl}}
| [[Dropbox]]
 
  +
| {{No|1=https://github.com/mikf/gallery-dl/issues/4472}}
| {{ic|user.com.dropbox.attributes}}
 
|
+
|
  +
|-
  +
| [[Gwenview]]
  +
| {{ic|user.xdg.tags}}
 
|
 
|
 
|-
 
|-
  +
| {{pkg|kfind}}
| [[emacs|emacs-vm]]
 
  +
| {{No|1=https://bugs.kde.org/show_bug.cgi?id=473864}}
| {{No}}
 
|
+
|
| Resets mbox xattrs.
 
 
|-
 
|-
  +
| {{pkg|konqueror}}
| [[Gwenview]]
 
  +
| {{No|1=https://bugs.kde.org/show_bug.cgi?id=473809}}
| {{ic|user.xdg.tags}}
 
|
+
|
|
 
 
|-
 
|-
  +
| kio
| {{pkg|recoll}}
 
  +
| [https://bugs.kde.org/show_bug.cgi?id=116617]
| {{ic|user.xdg.tags}}
 
|
+
|
|
 
 
|-
 
|-
  +
| [[Nautilus]]
| {{AUR|tmsu}}
 
| {{No|1=https://github.com/oniony/TMSU/issues/10}}
+
| {{No|1=https://discourse.gnome.org/t/16892}}
  +
| {{AUR|eiciel}} の Nautilus の拡張機能によってファイル拡張属性の完全なサポートを追加できます。
|
 
|
 
 
|-
 
|-
| {{AUR|tagspaces}}
+
| {{pkg|rclone}}
  +
| {{No|1=https://forum.rclone.org/t/910}}
| {{No|1=https://trello.com/c/iapsXZZe/64-option-to-store-tags-in-file-using-extended-attributes-xattr}}
 
|
 
|
 
 
|-
 
|-
  +
| {{pkg|recoll}}
| [[Wget]]
 
  +
| {{ic|user.xdg.tags}}
|
 
|
+
|
|
+
|-
  +
| {{AUR|tagspaces}}
  +
| {{No|1=https://trello.com/c/iapsXZZe/64-option-to-store-tags-in-file-using-extended-attributes-xattr}}
  +
|
  +
|-
  +
| {{AUR|tmsu}}
  +
| {{No|1=https://github.com/oniony/TMSU/issues/10}}
  +
|
  +
|-
  +
| [[Thunar]]
  +
| {{No|1=https://gitlab.xfce.org/xfce/thunar/-/issues/1195}}
  +
|
  +
|-
  +
| {{AUR|youtube-dl}}, [[yt-dlp]]
  +
| {{bc|
  +
user.xdg.referrer.url
  +
user.dublincore.title
  +
user.dublincore.date
  +
user.dublincore.description
  +
user.dublincore.contributor
  +
user.dublincore.format
  +
}}
  +
| {{ic|--xattrs}} フラグで有効化されます。
  +
|-
  +
| [[Wget]]
  +
| {{bc|
  +
user.xdg.origin.url
  +
user.xdg.referrer.url
  +
}}
  +
| {{ic|--xattrs}} フラグで有効化されます。
  +
|-
  +
| [[w:ja:Webkit]]
  +
| {{No|1=https://bugs.webkit.org/show_bug.cgi?id=260778}}
  +
|
 
|}
 
|}
  +
  +
== 他のタグ付けシステム ==
  +
  +
ファイルシステムやソフトウェアによるサポート不足により、拡張属性が使えない場合もあります。そのような理由により多くのメディアフォーマットは、[[Exiftool]] などのプログラムや音声用の {{AUR|id3}} といったより固有のプログラムを使って読み取ることのできるファイル形式でメタデータを保存します。
  +
  +
* 全種類のファイル: [[Exiftool]]
  +
* 音声: [[アプリケーション一覧/マルチメディア#オーディオタグエディタ|オーディオタグエディタ]]
  +
* 動画: [[ffmpeg]] の {{man|1|ffprobe}}
  +
  +
=== gvfs ===
  +
  +
ファイルシステムに依らないもう一つの回避策は Gnome 仮想ファイルシステム {{pkg|gvfs}} です。これは、メタデータ (gvfsd メタデータ) を保存するために使用されます。例えば、Firefox はこの方法で[https://hg.mozilla.org/mozilla-central/file/tip/toolkit/components/downloads/DownloadPlatform.cpp メタデータを保存]しており、以下のコマンドで確認できます:
  +
  +
$ gio info --attributes=metadata:: ''downloaded.html''
  +
  +
このアプローチをとっている他のプログラムとしては以下があります:
  +
  +
* [[Thunar]]: ファイルのカラーハイライトを保存するために使用しています。
   
 
== 参照 ==
 
== 参照 ==
   
* [https://www.freedesktop.org/wiki/CommonExtendedAttributes XDG guidelines for extended attributes]
+
* [https://www.freedesktop.org/wiki/CommonExtendedAttributes XDG の拡張属性のガイドライン]
* [[wikipedia:Extended file attributes#Linux]]
+
* [[Wikipedia:ja:拡張ファイル属性#Linux]]
 
* [https://www.lesbonscomptes.com/pages/extattrs.html Extended attributes: the good, the not so good, the bad.]
 
* [https://www.lesbonscomptes.com/pages/extattrs.html Extended attributes: the good, the not so good, the bad.]
  +
  +
{{TranslationStatus|Extended attributes|2023-12-23|794864}}

2023年12月23日 (土) 13:19時点における最新版

関連記事

xattr(7) から: "拡張属性は、ファイルやディレクトリと永続的に関連付けられた名前:値のペアです。" 拡張属性には4つのクラスがあります: security、system、trusted、そして user です。

警告: デフォルトでは、拡張属性は cprsync、そして他の似たようなプログラムによって保持されません。#拡張属性を保持する を見てください。

拡張属性は、ケイパビリティを設定する際にも用いられます。

ユーザ拡張属性

ユーザ拡張属性は、ファイルに関する任意の情報を保存するために使用できます。属性を作成するには:

$ setfattr --name=user.checksum --value="3baf9ebce4c664ca8d9e5f6314fb47fb" file.txt

拡張属性を表示するには getfattr を使用してください:

$ getfattr --encoding=text --dump file.txt
# file: file.txt
user.checksum="3baf9ebce4c664ca8d9e5f6314fb47fb"

拡張属性を削除するには:

$ setfattr --remove=user.checksum file.txt

特定の拡張属性を持つファイルを見つけるには、rawhideAUR を使ってください:

$ rh /path/to/dir '"XATTR_REGEX".reea'

一部のユーザ拡張属性には以下が含まれています:

  • user.mime_type: プログラムに mimetype を知らせ、推測しなくても良くします。
  • user.charset: Apache httpd モジュール mod_mime_xattr によって使用されます。
  • user.creator: そのファイルを作成したアプリケーションの名前。

XDG は、プログラムによって使用される標準化された拡張属性のセットも提案しています:

  • user.xdg.comment: Dolphin などのファイルマネージャによってサポートされます。
  • user.xdg.origin.url: URL からダウンロードしたファイル用。
  • user.xdg.robots.index: ファイルがインデックスに含まれるならば "true"。さもなくば "false"。
  • user.xdg.robots.backup: ファイルがバックアップに含まれるならば "true"。さもなくば "false"。
  • user.xdg.language
  • user.xdg.creator
  • user.xdg.publisher
  • user.xdg.origin.email.subject
  • user.xdg.origin.email.from
  • user.xdg.origin.email.message-id

user.xdg.tags は公式標準規格の一部ではありませんが、一部の人気なプログラムがこの属性のサポートを実装しているので「事実上」の標準となっています (#ソフトウェア 章を参照)。これは、各ファイルに対してユーザー定義のタグの CSV リストとして実装されています。

拡張属性を保持する

コマンド デフォルトで保持するか/必要なフラグ
cp --archive/--preserve=all/--preserve=xattr
mv Yes1
tar 作成時には --xattrs、展開時には --xattrs-include='*'
bsdtar 展開時に -p
rsync -X, --xattrs
cpio No
gzip No
pax No
syncthing syncXattrs を有効化する必要あり
  1. mv は、移動先のファイルシステムが拡張属性をサポートしていない場合、何も言わずに拡張属性を破棄します。

テキストエディタで拡張属性を保持するには、保存時に rename(2) を使わずファイルを切り詰める/拡張する (truncate) するように設定する必要があります。[1]

失いたくないデータに対してバックアップを取るべきであるのと同様に、拡張属性に対しても定期的にバックアップを取るべきです。カレントディレクトリ内の全ファイルの拡張属性の完全なバックアップを (再帰的に) 取るには:

$ getfattr --dump --recursive . > backup.txt

バックアップから復元するには:

$ setfattr --restore=backup.txt

サポート

ファイルシステム

Ext4BtrfsZFSXFS などの主要な Linux ファイルシステムの全てで拡張属性がサポートされています。カーネルは、拡張属性の名前は 255 バイトまで、値は 64 KiB まで許可しています。しかし、Ext4Btrfs では、拡張属性を "ファイルシステムブロック" 内に収める必要があることから、より小さい制限が課されるかもしれません。

NTFS は代替データストリーム (Alternative Data Streams) を使って user を保存します。マウントオプションの user_xattrstreams_interface=xattr がデフォルトで使用されるはずです。しかし、マウントオプション streams_interface=windows が使用されている場合は、拡張属性はサポートされないかもしれません。ntfs-3g は、FUSE 内での代替データストリームの拡張属性へのマッピングをサポートしています。

Linux 5.9 からNFS は拡張属性をサポートしています。

ソフトウェア

アプリケーション サポートされている拡張属性 備考
baloo
user.xdg.tags
user.baloo.rating
caja Yes 拡張機能 caja-xattr-tags と caja.eiciel によってサポートされています。
Chromium No リファラと URL をサポートしていましたが、プライバシーとセキュリティの理由により無効化されました。CVE-2018-20483 も参照してください。
braveAUR No
CURL
user.xdg.origin.url
user.xdg.referrer.url
--xattrs フラグで有効化されます。
Dolphin
user.baloo.rating
user.xdg.comment
user.xdg.tags
Dolphin はファイルのタグ付けに対して包括的なサポートを提供しています (コンテキストメニューを使用してファイルにタグを追加したり、ファイルのタグで検索するなどの機能を含む)。タグは user.xdg.tags 属性に CSV として保存されます。Dolphin#ファイルのタグ付け も参照。

[2][3]

Dropbox user.com.dropbox.attributes
emacs-vm No mbox 拡張属性はリセットされます。
Epiphany No
Exiftool No
fd No
findutils No
Firefox No
gallery-dlAUR No
Gwenview user.xdg.tags
kfind No
konqueror No
kio [4]
Nautilus No eicielAUR の Nautilus の拡張機能によってファイル拡張属性の完全なサポートを追加できます。
rclone No
recoll user.xdg.tags
tagspacesAUR No
tmsuAUR No
Thunar No
youtube-dlAUR, yt-dlp
user.xdg.referrer.url
user.dublincore.title
user.dublincore.date
user.dublincore.description
user.dublincore.contributor
user.dublincore.format
--xattrs フラグで有効化されます。
Wget
user.xdg.origin.url
user.xdg.referrer.url
--xattrs フラグで有効化されます。
w:ja:Webkit No

他のタグ付けシステム

ファイルシステムやソフトウェアによるサポート不足により、拡張属性が使えない場合もあります。そのような理由により多くのメディアフォーマットは、Exiftool などのプログラムや音声用の id3AUR といったより固有のプログラムを使って読み取ることのできるファイル形式でメタデータを保存します。

gvfs

ファイルシステムに依らないもう一つの回避策は Gnome 仮想ファイルシステム gvfs です。これは、メタデータ (gvfsd メタデータ) を保存するために使用されます。例えば、Firefox はこの方法でメタデータを保存しており、以下のコマンドで確認できます:

$ gio info --attributes=metadata:: downloaded.html

このアプローチをとっている他のプログラムとしては以下があります:

  • Thunar: ファイルのカラーハイライトを保存するために使用しています。

参照

翻訳ステータス: このページは en:Extended attributes の翻訳バージョンです。最後の翻訳日は 2023-12-23 です。もし英語版に 変更 があれば、翻訳の同期を手伝うことができます。