Operating System - HP-UX
1834831 Members
3253 Online
110070 Solutions
New Discussion

Re: Negative "Link count" showing in the ls -ld output.

 
S.J. Sarwar
Occasional Advisor

Negative "Link count" showing in the ls -ld output.

Hi,

I have this strange issue of having the Link count of a FS, showing as negative. Could anyone please help me......How to overcome that.

adeda22p:root [/eb_rak0_p/software/kintana] ls -ld logs
drwxr-xr-x -2 kintana kintana 1434624 Jul 21 15:18 logs/
adeda22p:root [/eb_rak0_p/software/kintana] cd logs
adeda22p:root [/eb_rak0_p/software/kintana/logs] mkdir test
mkdir: cannot access .: Permission denied
adeda22p:root [/eb_rak0_p/software/kintana/logs]


Thanks,
Sarwar.
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor

Re: Negative "Link count" showing in the ls -ld output.

The only times I have ever seen negative link count values have been as a result of a signed integer overflow so that you might see something like -32767. However, the fact that this is -2 makes that unlikely and that is probably a flag value. The very first thing that I would do is umount this filesystem and run fsck on it.
If it ain't broke, I can fix that.
Kevin Wright
Honored Contributor

Re: Negative "Link count" showing in the ls -ld output.

doesn't look good. Anything in lost+found on the FS? Probably will want to run a full fsck regardless and hope for the best.