TransWikia.com

Unable to delete hidden files starting with "._", containing special characters

Super User Asked by kraftydevil on January 1, 2022

The file name is ._03 Überlin.mp3, and it lives in a folder on a Western Digital NAS external drive, being accessed on a Mac:

$ ls -al
total 128
drwxrwxr-x@ 1 kraftydevil  staff   264 Jul 23 03:58 .
drwxrwxr-x@ 1 kraftydevil  staff   296 Jul 24 05:30 ..
-rw-rw-rw-  1 kraftydevil  staff  4096 Aug 24  2013 ._03 Überlin.mp3

Attempts

Finder: Simple Delete
enter image description here
Yields "The operation can’t be completed because one or more required items can’t be found. (Error code -43)"

Finder: Delete Enclosing Folder
enter image description here
Yields "The operation can’t be completed because the item "album" is in use."

Terminal: rm Attempts

$ #escape the space
$ rm ._03 Überlin.mp3 
rm: ._03 Überlin.mp3: No such file or directory

$ #escape the space and the 'Ü'
$ rm ._03 Überlin.mp3 
rm: ._03 Überlin.mp3: No such file or directory

$ #escape the space, the 'Ü', and the '_'
$ rm ._03 Überlin.mp3 
rm: ._03 Überlin.mp3: No such file or directory

$ #use single quotes
$ rm '._03 Überlin.mp3'
rm: ._03 Überlin.mp3: No such file or directory

$ #use double quotes
$ rm "._03 Überlin.mp3"
rm: ._03 Überlin.mp3: No such file or directory

$ #use --
$ rm -v -- ._03 Überlin.mp3 
rm: ._03 Überlin.mp3: No such file or directory

Terminal: Delete With ‘find’

find . -type f -name "._*" -perm +w -delete

No output and the file persists

Terminal: Delete By Inode Number Lookup

$ ls -ali
total 128
94691 drwxrwxr-x@ 1 kraftydevil  staff   264 Jul 24 12:45 .
96821 drwxrwxr-x@ 1 kraftydevil  staff   296 Jul 24 12:33 ..
94756 -rw-rw-rw-  1 kraftydevil  staff  4096 Aug 24  2013 ._03 Überlin.mp3

$ find . -inum 94756 -delete
find: -delete: unlink(./._03 Überlin.mp3): No such file or directory

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP