Why doesn't `getfattr -d` show anything?
Solution 1
To truly report all attributes you can use the argument -dm-
, which represents the arguments -d
and -m -
.
For example I launched Chromium, I went to https://bugsfiles.kde.org/attachment.cgi?id=86198, that action started to download a file and I named it "my_downloaded_file".
Then I executed getfattr -m- my_downloaded_file
and it showed:
# file: my_downloaded_file
user.xdg.origin.url
although more information was shown executing getfattr -dm- my_downloaded_file
:
# file: my_downloaded_file
user.xdg.origin.url="https://bugsfiles.kde.org/attachment.cgi?id=86198"
References:
- man getfattr
- https://unix.stackexchange.com/a/46587
- https://unix.stackexchange.com/a/50781
- https://www.pixelbeat.org/docs/linux_commands.html
- https://kign.blogspot.com.es/2008/08/mystery-of-plus.html
Solution 2
The man page of getfattr command is not clear on this, but to really see all output, use the following switch:
getfattr -m - $your_path_or_file_name
From man page:
-m pattern, --match=pattern
Only include attributes with names matching the regular expression pattern. The default value for pattern
is "^user\\.", which includes all the attributes in the user namespace. Specify "-" for including all
attributes. Refer to attr(5) for a more detailed discussion of namespaces.
bloys
Updated on September 18, 2022Comments
-
bloys almost 2 years
The successful command from which I started:
getfattr -n system.ntfs_times /media/hdd/oldfolder/
output
getfattr: Removing leading '/' from absolute path names # file: media/hdd/oldfolder/ system.ntfs_times=irrelevant
but if i try
getfattr -d /media/hdd/oldfolder/
orgetfattr -d -e text /media/hdd/oldfolder/
orhex
orbase64
as values of param-e
i get nothing.Why is that? I thought
-d
dump ALL attributes not NO attributes :)-
elig about 5 yearsI too tried and did not manage to get various options to work for me until I found and tried this:
getfattr -d -m ".*" <filename>
. Source: superuser.com/questions/858210/… -
Tom Hale almost 5 years
-