1833847 Members
2179 Online
110063 Solutions
New Discussion

Finding "hidden" files

 
SOLVED
Go to solution
Abhik Sarkar_2
Advisor

Finding "hidden" files

Hi everyone,

This is probably a strange question, but here goes.

I have a directory under /, say /abc. There are one or more files in this directory. Subsequently, another filesystem is mounted with /abc as the mount point. Naturally, the files which originally existed in /abc will no longer visible using commands like ls and find.

Is there any other way to confirm the existence of these files other than unmonuting the filesystem at that location?

Many thanks,
Abhik.
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: Finding "hidden" files

Hi Abhik:

Run 'ff' against the overmounted filesystem and grep for the "hidden" filesystem mountpoint in its output. For example:

# ff -F vxfs /dev/vgXX/lvolN | grep "/abc/"

Regards!

...JRF...


Asif Sharif
Honored Contributor

Re: Finding "hidden" files

Hi Abhik,

/abc will not show with ls -l command.

To see the hidden files , you have to use :

#ls -al / or /abc
#du -ak /abc

Regards,
Asif Sharif
Regards,
Asif Sharif
Abhik Sarkar_2
Advisor

Re: Finding "hidden" files

James, that was absolutely brilliant! Thanks!

Asif, thanks for your answer. However, I think you misunderstood my question. I am not looking for files which are hidden by virtue of being prefixed with a '.', but rather, for files which exist in a directory which has subsequently become a mount point for another file system...

Here's an example of what I meant and the output of what James said:

igniteSV:root> ls -lat /cdr/dummy.dat
/cdr/dummy.dat not found
igniteSV:root> ff -F vxfs /dev/vg00/lvol3 | grep "/cdr/"
vxfs ff: /dev/vg00/lvol3: 5159 files selected
./stc/omg/cdr/open 3446
./stc/omg/cdr/closed 3447
./stc/omg/cdr/archive 3448
./cdr/dummy.dat 4253

Abhik Sarkar_2
Advisor

Re: Finding "hidden" files

For those interested in why I asked this question, here's a brief...

We have a customer complaining that their two HP-UX systems show the usage of / at near 90-95% (output of bdf) and yet, "du -akx | sort -nr" doesn't show anything taking up the space.

While hunting on ITRC I came across Steven E. Protter's "hidden file trick" on http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=226255

Since these servers are carrying live traffic, I wanted to find without unmounting all filesystems, if there were indeed any "hidden" files, before I brought down the system to delete these files... and boy, did I find a treasure!

So, if possible, I would have assigned points to Steven E. Protter and Bill Hassell!!!

Thanks again to all.

Abhik.