Problema ao entender porque o getfattr -d não mostra nada

2

O comando bem-sucedido a partir do qual eu comecei:

getfattr -n system.ntfs_times /media/hdd/oldfolder/

saída

getfattr: Removing leading '/' from absolute path names
# file: media/hdd/oldfolder/
system.ntfs_times=irrelevant

mas se eu tentar

getfattr -d /media/hdd/oldfolder/ ou getfattr -d -e text /media/hdd/oldfolder/ ou hex ou base64 como valores de param -e i não recebem nada.

Por que isso? Eu pensei -d dump atributos ALL não atributos NO:)

    
por bloys 20.01.2015 / 10:59

2 respostas

3

Para realmente relatar todos os atributos, você pode usar o argumento -dm- , que representa os argumentos -d e -m - .

Por exemplo, eu abri o Chromium, fui para o link , essa ação começou a baixar um arquivo e Eu chamei de "my_downloaded_file".

Em seguida, executei getfattr -m- my_downloaded_file e mostrei:

# file: my_downloaded_file
user.xdg.origin.url

embora mais informações tenham sido exibidas executando getfattr -dm- my_downloaded_file :

# file: my_downloaded_file
user.xdg.origin.url="https://bugsfiles.kde.org/attachment.cgi?id=86198"

Referências:

- 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
    
por 12.02.2016 / 22:03
1

A página man do comando getfattr não está clara sobre isso, mas para realmente ver todas as saídas, use a seguinte opção:

getfattr -m - $your_path_or_file_name

Da página man:

-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.
    
por 20.01.2015 / 13:28