View Single Post
Posts: 118 | Thanked: 45 times | Joined on Dec 2009 @ Germany
#48
Originally Posted by kwotski View Post
The -x switch is supposed to make it not do that.

Maybe that's not operational here, where du is just a symlink to busybox. But it claims to support the switch:
I changed your script, so that the line
$du = `du -s /$_`;
now is
$du = `du -xs /$_`;

But it looks like "du" still follows the links. I tried in on mc which I manually moved away from rootfs. Although I'm not sure what your script does at that point of time - or in which directory "du" thinks it is.

Sorry, but I don't know perl - the only thing is that I heard people say it is a write only language (no read ).

So, does anyone now, how to modify that script to don't follow symbolic links?