Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
Distribution: Fedora 8, Ubuntu Server 8.04, RHEL 5
Posts: 12
Rep:
Mystery files, "not a directory"
Interesting and tricky problem. I downloaded the source of Pidgin plugin, which I attempted to install. The configure script made some files for this type:
Code:
./conf18760.dir/conf18760.file
There's a lot of these, each with different numbers. The conf*.file lists as a symbolic link, but it's broken (displays as white text on red background).
Every program I try to use on these files complains "Not a directory". I've tried stat, rm, unlink, ls and mv; they all say the same thing: "Not a directory". i.e.:
Code:
bash-3.2$ stat conf18760.file
File: stat: cannot read symbolic link `conf18760.file': Not a directory
Size: 14 Blocks: 1 IO Block: 4096 symbolic link
Device: 21h/33d Inode: 6387 Links: 1
Access: (0777/lrwxrwxrwx) Uid: (43095/ awm106) Gid: ( 70/ elug)
Access: 2009-01-24 12:21:21.174539300 +0000
Modify: 2009-01-24 11:09:02.116217000 +0000
Change: 2009-01-24 11:09:02.116258400 +0000
bash-3.2$ rm conf18760.file
rm: cannot remove `conf18760.file': Not a directory
It seems to me like the file isn't really a symbolic link. It's like it's empty. Everything that treats it as a symbolic link fails.
Is there a way to transform this 'symbolic link' into a plain file, so I can delete it? All I'm trying to do is remove this directory tree.
Other random bits of possibly helpful info:
This is in my home directory at university, mounted from a samba server
The system is RHEL5
I don't know what the fileserver runs. Our department uses Solaris, Linux and Windows for servers, but I don't know what this server runs.
Distribution: Fedora 8, Ubuntu Server 8.04, RHEL 5
Posts: 12
Original Poster
Rep:
Quote:
Originally Posted by {BBI}Nexus{BBI}
Have you tried deleting using the -f (force) switch?
The first thing I did was 'rm -rf ./*' at the top of this directory tree. It deleted everything but these files. I've just tried rm -rf on this file, and I got exactly the same error.
Quote:
Originally Posted by druuna
What happens if you try to find the original file using find and the inode given?
find -inum 6387
I expected this to return nothing, as all the other files it could've pointed to have been deleted. In fact, it returned the symlink itself: conf18760.file. Could '6387' be the inode of the symlink, rather than the file it points to? Otherwise, could this be a recursive symlink?
Distribution: Fedora 8, Ubuntu Server 8.04, RHEL 5
Posts: 12
Original Poster
Rep:
Solved (ish)
Okay, I've managed to delete these files afterall. I think it must have something to do with being mounted via Samba, and changes not propogating to the server.
I logged into a Linux server and 'rm -rf' on the directory tree: it worked. After refreshing the directory on my local machine, the files were gone. Perhaps there's a bug somewhere.
Those numbers are different. They must be the inode-numbers of themselves, otherwise the inode of linked.to.real.file.A would be the same as the inode of real.file.A.
If my understanding is correct, then the inodes would be the same if linked.to.real.file.A was a hardlink. Perhaps this is what you were thinking of?
Anyway, I'm not sure how or why this happened, but at least I've managed to delete the files. I suspect that remounting the Samba share would have had the same result as logging into another machine. Thanks for your help though!
Last edited by smiler_jerg; 01-24-2009 at 08:40 AM.
Reason: Additional information
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.