Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using following command to check the disk usage in my home direcory.

du -sk * | sort -n

I am getting the following output

273240  AQP
707720  oradiag
3176872 J2EEServer
23628720        var

I get a directory of size 100000910 without a name in the last line . How can I access/delete this ghost directory in my home directory.

share|improve this question
I have only 4 folders in my home directory .I don't know from where I am getting that extra line. – g4ur4v Nov 9 '12 at 10:09

The directory name might be composed of space characters (spaces, tabs...). With GNU coreutils (linux standard) use ls -Q which will put the filenames into quotes. Or check with a filemanager like Midnight Commander.

share|improve this answer

Maybe the name of the directory is ? (that is a space, or a tab). This is a perfectly correct Unix filename. Why don't you run

ls -Ql

And check for yourself?

share|improve this answer
With ls -l, you will be able to see the directory, but no way of know if its one space, to spaces, a tab, etc. – jordanm Nov 9 '12 at 14:56
good point. I add the -Q option. – January Nov 9 '12 at 15:08

It is possible that the file is composed entirely of non-printable or whitespace characters. You can probably see it using printf '<%q>\n' *.

You should be able to get the inode number using ls -il. After that, you can remove it by using something like find . -xdev -maxdepth 1 -inum 1234 -delete. Given its size, the directory is probably not empty; you can change into it to examine it with cd "$(find . -xdev -maxdepth 1 -inum 1234)" to examine the contents at your leasure.

share|improve this answer

I would recommend ls -al see if the file is there as well.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.