Can not cd into or remove directory [SOLVED]

General support questions
Post Reply
lhouk
Posts: 15
Joined: 2014/03/20 14:46:52

Can not cd into or remove directory [SOLVED]

Post by lhouk » 2017/03/15 20:29:00

This one has me stumped. I can see a directory, but I can not cd into it or remove it.

Code: Select all

[root@sysname /]# ls -dl so*
drwxr-xr-x. 2 root root 0 Mar 10 17:47 socrrates

[root@sysname /]# ls -l so*
ls: cannot open directory socrrates: No such file or directory

[root@sysname /]# ls -dl so* | cat -vet
drwxr-xr-x. 2 root root 0 Mar 10 17:47 socrrates$

[root@sysname /]# file socrrates
socrrates: directory

[root@sysname /]# cd socrrates
-bash: cd: socrrates: No such file or directory

[root@sysname /]# rm -ir socrrates
rm: descend into directory `socrrates'? y
rm: remove directory `socrrates'? y
rm: cannot remove `socrrates': No such file or directory
Anyone have any ideas about how I can remove this? Thanks in advance to all who respond.

UPDATE: I did a search for the string "socrrates" in every file in my /etc directory, and I found an entry in /etc/mtab. I then ran the command "umount -f /socrrates", which worked, after which I was able to use "rm" to remove the directory. Thanks to tunk for his response.
Last edited by lhouk on 2017/03/16 16:30:06, edited 1 time in total.

tunk
Posts: 1206
Joined: 2017/02/22 15:08:17

Re: Can not cd into or remove directory

Post by tunk » 2017/03/15 21:18:54

Can you take a look at this: viewtopic.php?t=1315

Post Reply