Operating System - HP-UX
1837937 Members
3092 Online
110124 Solutions
New Discussion

du -sk reports files not found

 
Rosli Ahmad
Frequent Advisor

du -sk reports files not found

Hi,
I issued du -sk of filesystem and it reports:
du: ./work_root/bpi2/psc-dstep: A file or directory in the path name does not exist.

Those files/dir are there:
root@pgfs1>ls -alrt ./work_root/bpi2/psc-dstep
total 32
drwxrws--- 6 bhchua psc 512 Aug 20 2003 bhchua
drwxrws--- 4 bhchua psc 512 Aug 26 2003 .
drwxrws--- 5 cong5 psc 512 Oct 21 2003 cong5
drwxrws--- 7 pscda psc 512 Jan 19 2004 ..

The real mystery is, it reports different files/dirs when in different subdir. Pls. advise what's the cause and how to fix this. Thank you very much.

regards
-rosli-
2 REPLIES 2
Muthukumar_5
Honored Contributor

Re: du -sk reports files not found

It is problem with format you have used as,

du -ks ./work_root/bpi2/psc-dstep so that it will try to check from current directory there.

Example:

[/] # /tmp/test/okie

pwd is /

[/] # du -ks ./tmp/test/okie

will work there,

but

[ /home/muthu] # du -ks ./tmp/test/okie

will try to search

/home/muthu/tmp/test/okie not /tmp/test/okie there.

Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: du -sk reports files not found

Try to use full path name as,

du -sk /from root directory to that file/

If you try as ./pathname then it will try to search from current directory ( . ) and if you try as ../pathname then it will search from parent direcrory ( .. )

Any system command with file / directory operation then use full path name there to avoid confusion.
Easy to suggest when don't know about the problem!