修复删除文件但不删除其扩展属性的问题

修复删除文件但不删除其扩展属性的问题

我试图删除空文件夹,但没有成功,经过一番搜索后,我似乎删除了这些文件夹中的文件,但没有删除它的扩展属性

amr@MacBook ~/folders> ls -la -R
total 24
drwxrwxrwx   6 amr  staff   192 Mar  9 14:37 .
drwx---r-x+ 40 amr  staff  1280 Mar  9 16:01 ..
-rw-r--r--@  1 amr  staff  8196 Mar  9 16:01 .DS_Store
drwxrwxrwx   5 amr  staff   160 Feb 27 19:06 a
drwxrwxrwx   5 amr  staff   160 Mar  9 14:01 b
drwxrwxrwx   3 amr  staff    96 Feb 27 19:00 f

./a:
total 0
drwxrwxrwx  5 amr  staff  160 Feb 27 19:06 .
drwxrwxrwx  6 amr  staff  192 Mar  9 14:37 ..

./b:
total 0
drwxrwxrwx  5 amr  staff  160 Mar  9 14:01 .
drwxrwxrwx  6 amr  staff  192 Mar  9 14:37 ..

./f:
total 0
drwxrwxrwx  3 amr  staff   96 Feb 27 19:00 .
drwxrwxrwx  6 amr  staff  192 Mar  9 14:37 ..

amr@MacBook ~/folders> rm -d -R -f *
rm: a: Directory not empty
rm: b: Directory not empty
rm: f: Directory not empty
amr@MacBook ~/folders> rmdir   *
rmdir: a: Directory not empty
rmdir: b: Directory not empty
rmdir: f: Directory not empty

amr@MacBook ~/folders> xattr -l -r *
xattr: No such file: a/784a181552c10546bdab9595d963a36fa65d6e17cc04609285349cb81be623b9--harfbuzz-2.3.1.mojave.bottle.tar.gz.incomplete.lock
xattr: No such file: a/pixman.formula.lock
xattr: No such file: a/0c26d4c3daf0b26cd91366caf1df3eca0bad5611e9742a0f8b409d6b80fc6a53--pixman-0.38.0.mojave.bottle.tar.gz.incomplete.lock
xattr: No such file: b/libpixman-1.dylib
xattr: No such file: b/libpixman-1.a
xattr: No such file: b/libpixman-1.0.dylib
xattr: No such file: f/pixman

并尝试删除属性时

amr@MacBook ~/folders> sudo xattr -rc *
xattr: No such file: a/784a181552c10546bdab9595d963a36fa65d6e17cc04609285349cb81be623b9--harfbuzz-2.3.1.mojave.bottle.tar.gz.incomplete.lock
xattr: No such file: a/pixman.formula.lock
xattr: No such file: a/0c26d4c3daf0b26cd91366caf1df3eca0bad5611e9742a0f8b409d6b80fc6a53--pixman-0.38.0.mojave.bottle.tar.gz.incomplete.lock
xattr: No such file: b/libpixman-1.dylib
xattr: No such file: b/libpixman-1.a
xattr: No such file: b/libpixman-1.0.dylib
xattr: No such file: f/pixman

相关内容