How to Remove Oddly Named Files on Unix
Unix sometimes produces files that are oddly named. These files consist of characters that don't exist on a normal keyboard, thereby making it impossible to remove using the normal procedures. There are a few workarounds to delete these files.
Instructions
-
-
1
Try using the wild-card function in Unix to remove the files. For example, if the file begins with the letter Q then try "ls Q*" and see if it brings up just this one file. If so, use the remove command, "rm Q*", to remove this file.
-
2
Choose this longer more tedious way if the wild card brings up too many files that you do not want to delete. Type "cd ..".
-
-
3
Type the following command: "rm -ir xxxx", where xxxx is the name of the directory containing the oddly named file.
-
4
Respond to the prompt by answering "y". Now the system goes through your files one by one and asks if you want to remove the file presented. You must answer "y" or "n". "y" is yes, remove, and "n" is no, don't remove.
-
5
Remove the oddly named file by answering "y" when it comes up. Use this method to remove oddly names files in Unix.
-
1
Tips & Warnings
Follow Step 3 carefully. If you type rm and the file name, Unix removes the entire directory. You can't retrieve it afterwards, so be sure to use the command as written, "rm -ir xxxx".