I have found a directory on my web server that have 2 same directory names in the same location on the same partition. Is there a way to mkdir a name twice and be able to see them both in the same location?
Heres an example of the ouput:
[root]# ls
access_log.1.bkup access_log.1.bkup.2.gz data public_html
access_log.1.bkup.1.gz access_log.1.bkup.3.gz public_html
Unix forbids the same file name under the same directory. How could this be possible?
As you can see there are two public_html directories and they both have two different inode numbers but when you cd into public_html which one would you end up in?
Is there some way to know which one is the suspicious one? I would like to delete the suspicious public_htm. I believe an unauthorized access has created this duplicate and doing something malicious.
I have use the command find . -inum 293843 | xargs cd to try to change directory to the one I thought was suspicious but I get an error message saying directory doesn't exist. And the same error message for the other directories by trying to CD into a directory by specifying the inode instead of the file name.
Any help and ideas would be appreciated!
I need to cd into a directory by specifying the inode number and not the file name.
I would aslo like to know the possibility of creating two same name folders under same directory.
Before I delete the suspicious one by specifying the inode with the find command I wanted to CD into it to see if there is anything interesting. But I can not find a way to CD into a directory by specifying just the inode instead of the filename.
Has anyone ever experienced having two same directory in the same location before?
What I meant was asking you to post the output of the command 'ls -lb', without any find or xargs, issued from the directory where these "duplicate" directories reside. Because if it's not a filesystem problem, but just a naming problem (because of non-printing special characters) that's the easiest way to detect them.