Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-19-2010, 01:57 PM   #1
Registered: Nov 2008
Posts: 489

Rep: Reputation: 36
how to delete unreadable file?

how to delete unreadable file?

As you can see at attached picture, there is two unreadble files at root directory.

-rw-r--r--   1 root     root  6643  8월 30  2005 +?+?++ ?+┧++?+ +痰ㄹ?++-? ┧ +痰ㄶ? 찻+候?.txt
-rw-r--r--   1 root     root  4652  8월 30  2005 +?+?++ ?+┧++?+ +痰ㄹ?++-? ┧ +痰ㄶ? 찻+候?.txt.bak
drwxr-xr-x  10 sitetest  502  4096  8월 19 01:08 _work
drwxr-xr-x   3 root     root  4096  8월 10 15:04 backup
drwxr-xr-x   2 root     root  4096  8월 13 23:49 bin
drwxr-xr-x   5 root     root  4096  8월 13 15:46 boot
drwxr-xr-x   2 root     root  4096  8월 14 00:25 command
Please let me know how to delete this.

Thanks in advance.
Attached Thumbnails
Click image for larger version

Name:	20100820unableremove.jpg
Views:	66
Size:	107.5 KB
ID:	4354  
Old 08-19-2010, 02:40 PM   #2
Senior Member
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
Do you know what they are ? It would terrible to delete something you later rely on.
If there are no other .txt or .bak files in the root directory, run rm *.bak *.txt

It's odd that in the screenshot all the entries are listed as DIR, when the suspects are clearly not directories.
Old 08-19-2010, 02:43 PM   #3
Registered: Feb 2004
Location: Olympia, WA
Distribution: SolydK
Posts: 442
Blog Entries: 3

Rep: Reputation: 60
The output of ls shows that they are readable. They are just not writable by anyone but root. The filenames are quite strange, though. What are you doing to try to delete them? Are you trying to do so as a regular user? Are you logged in as root? Are you using sudo? Are you having problems specifying the filename to delete? Have you tried changing the file attributes to make them writable?

The first character of each filename appears to be a plus sign. Is that correct? If so, you can use bash's tab completion feature to fill in the remaining, possibly untypable, characters of the filename. Things will be easier on you if you first rename them using the mv command to something easier to type. You must be root to do any of this, though. So, either su to root or use sudo to run your commands as root.
Old 08-19-2010, 02:45 PM   #4
Registered: Aug 2008
Location: Denmark
Distribution: Fedora, Ubuntu, Solaris
Posts: 35

Rep: Reputation: 19

Available options will depend on which Linux/shell you are running. You can try the following:

From a graphical file manager
command line press tab for file name completion
Remove all .txt files prompting for confirmation, only answer y for required file
rm -i *.txt
copy and paste the file name between double quotes
ls -al "+?+?++ ?+┧++?+ +痰ㄹ?++-? ┧ +痰ㄶ? 찻+候?.txt"
List its inode value then use find to remove the file.

>touch "+?+?++ ?+┧++?+ +痰ㄹ?++-? ┧ +痰ㄶ? 찻+候?.txt"
>ls -i
1704195 +?+?++ ?+???++?+ +???????++-? ??? +??????? ???+????.txt
>find . -maxdepth 1  -inum 1704195 -exec rm {} \;
Old 08-19-2010, 03:00 PM   #5
Registered: Nov 2008
Posts: 489

Original Poster
Rep: Reputation: 36

"rm -i *.txt" works!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Howto identify the file associated with an unreadable disk sector of vfat fs yafrank Linux - General 6 01-08-2009 11:17 PM
unreadable code under /var/adm/message file UltraSoul Solaris / OpenSolaris 8 05-09-2007 08:42 PM
Console unreadable file name UltraSoul Linux - Software 0 10-28-2006 11:31 AM
file permissions unreadable - ubuntu edgy 6.10 pwrlftr220 Linux - Software 2 10-25-2006 05:48 AM
Using CIFS Makes Some File Names Unreadable fortezza Linux - Networking 5 10-22-2006 03:15 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration