23.16 Removing a Strange File by its I-numberIf wildcards don't work (23.12 ) to remove a file with a strange name, try getting the file's i-number (1.22 ) . Then use find 's -inum operator (17.10 ) to remove the file. Here's a directory with a weird filename. ls (with its default -q option (16.14 ) on BSD UNIX) shows that it has three unusual characters in it. Running ls -i shows each file's i-number. The strange file has i-number 6239. Give the i-number to find and the file is gone: % Instead of deleting the file, I could also have renamed it to newname with the command: % If the current directory has large subdirectories, you'll probably want to add the find -prune operator (17.23 ) for speed. - |
|