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! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-02-2009, 04:10 PM
|
#1
|
Member
Registered: Jul 2008
Location: Indiana
Distribution: Fedora, Ubuntu, Slackware
Posts: 203
Rep:
|
Can't delete directory with funny symbols in the name
I have two directories here that have these odd symbols in their names like they are maybe Portugese or something. Anyhow, I can't delete them or move them or anything in dolphin because it keeps giving me an error saying that they do not exist, and I can't type them from a prompt because of the symbols. So what should I do about this?
|
|
|
07-02-2009, 04:27 PM
|
#2
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
Varied options:
* try tab-expansion on the command-line.
* try mc
|
|
|
07-02-2009, 04:34 PM
|
#3
|
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083
|
It's strange that dolphin can't erase them. Are you sure that the file system is 100% sane (fsck) and that your user has read and write permissions over the files you are trying to delete?
|
|
|
07-03-2009, 01:29 AM
|
#4
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,397
|
Try from the cmd line using single quotes around each name, or '\' before those odd chars.
Another technique is to move the sane files to another dir, then 'rm -rf dir'
|
|
|
07-03-2009, 06:29 AM
|
#5
|
Member
Registered: Jul 2008
Location: Indiana
Distribution: Fedora, Ubuntu, Slackware
Posts: 203
Original Poster
Rep:
|
Quote:
Originally Posted by chrism01
Try from the cmd line using single quotes around each name, or '\' before those odd chars.
Another technique is to move the sane files to another dir, then 'rm -rf dir'
|
Thats what I ended up doing, just moving the good ones out and then as root blowing away the old directory.
I don't know how these files can even be stored to the disk with these crazy symbols in the names if the file system can't even recognize them. I'd like to find some more just to play around with them.
|
|
|
07-03-2009, 09:02 AM
|
#6
|
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083
|
If the files are there and are correct they should be manageable by the tools, might it mc, rm, dolphin or whatever.
The tools don't implement the low level functions to deal with the fs themselves, that responsibility is shared between glibc and the kernel. That basically means that if the kernel could store the file it should be able to handle it as well. Which is turn means that if the file was correct you shouldn't have any problem to deal with it.
If you couldn't deal with it there must be a problem of other nature. And that's why I suggested you fsck above. Maybe it's nothing, and I don't want to sound like a smart ass, but if there was a problem of fs corruption and you don't solve it you are calling for problem in the future. There's also the possibility that the -hypothetical- fs corruption has been sorted by deleting the files, though.
So I'd just force fsck to run the next reboot to be on the safe side.
|
|
|
07-03-2009, 09:22 AM
|
#7
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
One technique you can use is to list the files with the -i option: ls -i, to learn what the inode number is.
Then run "find . -maxdepth 1 -type d -inum <inode#> -exec rmdir '{}' \;"
The maxdepth & type options aren't necessary for the command to work, but may save considerable time locating the file or directory.
Use "-type f" & "-exec rm '{}' \;" to delete a file with "evil" characters.
|
|
|
07-04-2009, 03:45 PM
|
#8
|
Member
Registered: Jul 2008
Location: Indiana
Distribution: Fedora, Ubuntu, Slackware
Posts: 203
Original Poster
Rep:
|
Quote:
Originally Posted by i92guboj
So I'd just force fsck to run the next reboot to be on the safe side.
|
I ran fsck and everything appears fine.
What is strange though(and I posted it in another thread), is that two times now the machine has rebooted randomly, and this machine has been running stable for months. Nothing in the logs at all about why it would reboot.
Is it possible that the two things are related? It seems to be a little too coincedential to me. Hard drive failing maybe?
|
|
|
11-28-2009, 08:56 PM
|
#9
|
LQ Newbie
Registered: Jan 2009
Location: Finland
Distribution: Ubuntu
Posts: 11
Rep:
|
Sorry for bringing up an old thread...
I have seen the same behavior with Dolphin (and actually also Krusader and Konqueror): it can't handle files with incorrect (or invalid? - I don't have these programs in English) character encoding in their filenames. Incorrectly encoded characters are shown with a diamond shape containing a question mark. It can't delete them, move them, copy them or open them with an application. Thunar an PCMan File Manager shows the files in the same way but have no problems in handling them. Also Nautilus can work with them but won't open the trash bin if it contains a file with incorrect character encoding.
I have some Japanese .mp3 files with these problematic characters. I think that in some Asian countries they have used some other codes for their characters (not Unicode) and western computers don't know how to handle them.
So to answer the last post: If Dolphin can't handle files with funny characters, it do not mean that the hard drive is failing. It is just that the file manager can't handle filenames with incorrectly encoded characters.
|
|
|
All times are GMT -5. The time now is 05:20 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|