aboutsummaryrefslogtreecommitdiff
path: root/functions/rlsxattr.fish
blob: 0e71e49ae5915e6e1450961d1c02612c5f5b7dc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function rlsxattr --description 'Recursively list all files with xattrs'

if not command -sq 'getfattr'
  echo "Can't find getfattr."
  return 1
end

if not command -sq 'sed'
  echo "Can't find sed."
  return 1
end

if not command -sq 'awk'
  echo "Can't find awk."
  return 1
end

getfattr -R -h -d . 2>/dev/null | grep '^# file:' | sed 's/^# file: //'

end