aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorDeposite Pirate2025-10-12 13:48:16 +0200
committerDeposite Pirate2025-10-12 13:48:16 +0200
commit1b151a60bd3e979bed46e1a22f131e4aee3f2078 (patch)
treec228361f393d9d9ea7ad88bd3da2787c8f01c7ca /functions
parent2be0411de222969202f0d736eed0e20312a32bd5 (diff)
More macos noise management
Add script to list files with xattrs. new file: functions/rlsxattr.fish
Diffstat (limited to 'functions')
-rw-r--r--functions/rlsxattr.fish20
1 files changed, 20 insertions, 0 deletions
diff --git a/functions/rlsxattr.fish b/functions/rlsxattr.fish
new file mode 100644
index 0000000..0e71e49
--- /dev/null
+++ b/functions/rlsxattr.fish
@@ -0,0 +1,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