Directory cannot be deleted!!!

Friends,
I have accidently, as root, created a directory gabsf under /home. Now I cannot delete this thing, I have tried rm and rmdir, as well as explicit path name, but it is really undeleteable. Here is what ls -l says.

 
# ls -l /home
total 6
drwxr-xr-x   2 dawood   dawood       2 Sep  5 20:00 dawood
drwxr-xr-x   2 root     root           2 Sep  5 20:01 gabsf
#
 

and here is the output of file

 
# file /home/gabsf
/home/gabsf:    cannot open: No such file or directory
#

the output of rm -r,
# rm -r /home/gabsf
/home/gabsf: No such file or directory
#

output of rmdir -r command

 
# rmdir -r /home/gabsf
rmdir: illegal option -- r
Usage: rmdir [-ps] dirname ...
#

Looking forward to your wonderful replies.
Thanks!

Try deleting it by inode:

$ ls -id gabsf
493909 gabsf
$ find . -inum 493909 | xargs rm -r
1 Like

That might not work with xargs, in which case use -exec:

# find . -inum 4044889145 -exec rm -r {} \;

edit:

Actually, using -I it works :slight_smile:

# find . -inum 4044889145 | xargs -I{} rm -r {}
1 Like

"rm -rf /home/gabsf" should work, I guess.