LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 04-06-2005, 07:29 PM   #1
mickeyboa
Senior Member
 
Registered: May 2004
Location: Indianapolis, Indiana
Distribution: FC-KDE, 32 and 64 bit
Posts: 1,719

Rep: Reputation: 68
This is a good one - lets see if anyone can figure it out


I have got a supposed directory that even root cannot delete, see below:

drwxrwxr-x 2 mickey mickey 4096 Jan 14 14:15 ???Eb????o%?0??}?? w???M??n??????uz???@?,A????3???????eI?B?OOf;s?{E???X?U <?l?????@59?????

[root@mickeyboy mickey]# cd ???Eb????o%?0??}?? w???M??n??????uz???@?,A????3???????eI?B?OOf;s?{E???X?U <?l?????@59?????
bash: cd: ???Eb????o%?0??}??: No such file or directory
bash: ?l?????@59?????: No such file or directory

It's driving me nuts , sitting there on my user home directory and no matter what
command i use to remove it I can't remove it.
And how it got there was a accident , it isn't affecting anything.
Please help before I go over the deep end.
If I don't get rid of it pretty soon I'm going back to $Windows.

Jim
 
Old 04-06-2005, 07:33 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Some of that should be escaped in shell, but isn't being on the command you issued. Try:

rm -rf \?<tab>

to use autocompletion.
 
Old 04-06-2005, 08:56 PM   #3
mickeyboa
Senior Member
 
Registered: May 2004
Location: Indianapolis, Indiana
Distribution: FC-KDE, 32 and 64 bit
Posts: 1,719

Original Poster
Rep: Reputation: 68
no, rm -rf \?<tab> didn't work.
But Thanks

Jim
 
Old 04-06-2005, 10:20 PM   #4
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Quote:
If I don't get rid of it pretty soon I'm going back to $Windows.
That's pretty lame.

Anyway, as root user ( su - ) I created the said directory and removed it like this......
Code:
# mkdir "???Eb????o%?0??}?? w???M??n??????uz???@?,A????3???????eI?B?OOf;s?{E???X?U <?l?????@59?????"

# ls
Desktop
???Eb????o%?0??}?? w???M??n??????uz???@?,A????3???????eI?B?OOf;s?{E???X?U <?l?????@59?????

Then, I used the command:  rm -rf ???  and pressed the tab key to complete the directory name. It came out looking like this....
# rm -rf \?\?\?Eb\?\?\?\?o%\?0\?\?\}\?\?\ w\?\?\?M\?\?n\?\?\?\?\?\?uz\?\?\?\@\?\,A\?\?\?\?3\?\?\?\?\?\?\?eI\?B\?OOf\;s\?\{E\?\?\?X\?U\ \<\?l\?\?\?\?\?\@59\?\?\?\?\?/

Now the ls comfirms that it is gone.
# ls
Desktop
#

Last edited by homey; 04-06-2005 at 10:22 PM.
 
Old 04-07-2005, 05:52 AM   #5
mickeyboa
Senior Member
 
Registered: May 2004
Location: Indianapolis, Indiana
Distribution: FC-KDE, 32 and 64 bit
Posts: 1,719

Original Poster
Rep: Reputation: 68
And what's really wierd is that if you look at the directory with Super User file manager it shows that Root doesn't even have permission to read it.
It has a lock in front of it .
Even after you have issued the command and put the first ? and then <tab> it won't even list out the complete directory name, like ? isn't
the first character of the directory name , which inicates that it is..

Jim
 
Old 04-07-2005, 08:14 AM   #6
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Maybe you will have some luck using find .
For example, I change to the user directory and run this command to see how old the directory is.
In this case -mtime -1 is looking for directories that are less than one day old.
Code:
# find . -maxdepth 1 -type d -mtime -1 -exec ls -d {} \;
.
./test2
./test
./test1
Once I know how old the directory is, I can use find again to remove it.....
Code:
# find . -maxdepth 1 -type d -mtime -1 -exec rm -rf {} \;

Then I run the first find to verify that the new directories are gone.
# find . -maxdepth 1 -type d -mtime -1 -exec ls -d {} \;
.
#
 
Old 04-07-2005, 05:06 PM   #7
mickeyboa
Senior Member
 
Registered: May 2004
Location: Indianapolis, Indiana
Distribution: FC-KDE, 32 and 64 bit
Posts: 1,719

Original Poster
Rep: Reputation: 68
I ran your command as you suggested and below is what I got
Thanks for trying.

Jim

[root@mickeyboy mickey]# find . -maxdepth 1 -type d -mtime -1 -exec ls -d {} \;
.
[root@mickeyboy mickey]# find . -maxdepth 1 -type d -mtime -1 -exec rm -rf {} \;
rm: cannot remove `.' or `..'
[root@mickeyboy mickey]# find . -maxdepth 1 -type d -mtime -1 -exec ls -d {} \;
.
[root@mickeyboy mickey]# find . -maxdepth 1 -type d -mtime -1 -exec rm -rf {} \;
rm: cannot remove `.' or `..'
[root@mickeyboy mickey]# find . -maxdepth 1 -type d -mtime -1 -exec ls -d {} \;
.
[root@mickeyboy mickey]# ls
???Eb????o%?0??}?? w???M??n??????uz???@?,A????3???????eI?B?OOf;s?{E???X?U <?l?????@59?????
 
Old 04-07-2005, 05:19 PM   #8
mjmwired
Member
 
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620

Rep: Reputation: 39
I'm not sure why this hasn't been suggested, but usually when I find a directory like that I have some sort of file system corruption. Login as root (preferably under single user mode or from a boot disk) and do a thorough scan with 'fsck' ('man fsck' for help).

(I updated this considering macemoneta's comments)

Last edited by mjmwired; 04-08-2005 at 07:49 AM.
 
Old 04-07-2005, 06:09 PM   #9
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Under Fedora Core, you would want init level 1 (single user, no services started). Init level 3 is defined in Fedora as multi-user mode, all services started, without X. Running fsck in that mode will cause file system corruption, if you don't already have it. Be careful with init levels; different distributions define them differently.
 
Old 04-07-2005, 09:24 PM   #10
mjmwired
Member
 
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620

Rep: Reputation: 39
Not that I'm recommending, but just thought I would point out that I've done full fsck scans on runlevel 3 with multiple services and have never had file corruption. But I guess the best thing is to do whatever the instructions say.
 
Old 04-07-2005, 09:41 PM   #11
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
The problem is that fsck is directly modifying on-disk data, while the kernel filesystem has a different view. In single-user mode, only root is running, and root is only executing fsck, so the two views can't get out of sync. In multi-user mode, various applications are writing (logs, for example), so fsck updates a data structure, then the kernel flushes buffers with a sync, and now there's a fine mess. Timing, and which data structures are being updated, matter of course so there's no guarantee that there will be damage; it's just a very unsafe situation.
 
Old 04-08-2005, 06:22 AM   #12
mickeyboa
Senior Member
 
Registered: May 2004
Location: Indianapolis, Indiana
Distribution: FC-KDE, 32 and 64 bit
Posts: 1,719

Original Poster
Rep: Reputation: 68
Well guys , we will have to carry on another day with this little project, I just crashed my Linux box
because of the improper use of FSCK. Another day.
Read Post "I crashed my FC3 PC, need help with Knoppix"
Thanks for your help.
Jim
 
  


Reply



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
ok... lets see some uptimes trey85stang General 27 04-15-2004 05:22 AM
Lets Make Linux a Community!!! EyeSeven Mandriva 1 10-16-2003 02:40 AM
Lets Make Linux a Community!!! EyeSeven Linux - General 1 10-15-2003 11:16 PM
Lets get these two talking! Tesl Linux - Networking 1 09-18-2003 03:39 PM
lets play a new game Brain Drop General 60 08-18-2003 09:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 08:57 AM.

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