Monday, April 29, 2024
13
rated 0 times [  13] [ 0]  / answers: 1 / hits: 4937  / 2 Years ago, thu, october 6, 2022, 5:13:53

I use Ubuntu 9.10 (Karmic) and I have a directory with many files, among them these two files:



./baer.jpg
./bär.jpg


I would like to delete bär.jpg but I can't.



If I type rm b and hit TAB, it shows me both files, if I append ä and hit TAB, nothing gets displayed.



What must be done in order to delete bär.jpg?



Deleting the parent folder is not a solution for me, as there are plenty of files in this directory that are used by a productive environment.


More From » command-line

 Answers
2

I just found out how to delete such files witch special characters:



  1. cd <directory with that file>



  2. ls -ali



  3. At the very left of the directory listing you see the ID of the inode of each file.



  4. Delete your file via inode ID:


    find . -inum <inode ID of your file> -exec rm -i {} ;




This worked fine for my issue. Hope this helps!


[#33499] Friday, October 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
puccop

Total Points: 66
Total Questions: 99
Total Answers: 93

Location: Aruba
Member since Sun, Nov 27, 2022
1 Year ago
;