This shows you the differences between two versions of the page.
— |
remove_files_directories_with_strange_names [2011/06/01 12:58] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Remove files or directories with strange names ====== | ||
+ | You sometime encounter files/directories with none printable characters in the name. | ||
+ | In order to remove such files/directories use the inode reference. | ||
+ | |||
+ | First find the inode of the file/directory | ||
+ | |||
+ | ls -il | ||
+ | | ||
+ | Output (example): | ||
+ | |||
+ | 73302 drwx------. 2 root root 4096 May 14 14:10 05?? | ||
+ | |||
+ | Remove the directory and all content: | ||
+ | find . -inum 73302 -exec rm -rfi {} \; | ||
+ | |||
+ | You can leave the i (interactive) if you don't want any questions | ||
+ | |||
+ | [[http://www.cyberciti.biz/tips/delete-remove-files-with-inode-number.html]] |