Notices


Reply
Thread Tools
fnordianslip's Avatar
Posts: 670 | Thanked: 359 times | Joined on May 2007
#41
Might it be the case that du follows links into other file-systems and includes the size of their contents?
__________________
Class .. : Lame hacker & beardy boffin
Humour . : [#######---] Alignment: Apathetic anarchist
Patience : [####------] Weapon(s): My cat, my code.
Agro ... : |#---------] Relic(s) : N900, MacBookPro, NSLU2, N800, SheevaPlug, Eee-901, Core2-Quad, PS3
"In theory, theory and practice are the same. In practice, they're not."
--
Beware of extras-devel.
 
Posts: 236 | Thanked: 223 times | Joined on Oct 2009 @ NE UK
#42
Originally Posted by fnordianslip View Post
Might it be the case that du follows links into other file-systems and includes the size of their contents?
The -x switch is supposed to make it not do that.

-x, --one-file-system
skip directories on different file systems

Maybe that's not operational here, where du is just a symlink to busybox. But it claims to support the switch:

~ $ du --help
BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso26+0m5) multi-call binary

Usage: du [-aHLdclsxhmk] [FILE]...
 

The Following User Says Thank You to kwotski For This Useful Post:
Posts: 1,208 | Thanked: 1,028 times | Joined on Oct 2007
#43
Originally Posted by roamerjiang View Post
i just reinstalled the mplayer, and then uninstalled it again from application manager, but result is still the same. any suggestion that i can uninstall it properly? thank you very much because my fbreader also get same problem
Maybe you should show step by step what is the problem? According to your previous message package was properly uninstalled.
 
Posts: 62 | Thanked: 10 times | Joined on Oct 2009
#44
Originally Posted by mikkov View Post
Maybe you should show step by step what is the problem? According to your previous message package was properly uninstalled.
thanks for your reply. I'm sorry that i'm quite new to linux system. how can i show it step by step? or is there any command link i can use in xterminal to do that?
 
Posts: 236 | Thanked: 223 times | Joined on Oct 2009 @ NE UK
#45
Originally Posted by roamerjiang View Post
thow can i show it step by step?
I think he's just asking for you to explain what your problem is, slowly and thoroughly, one step at a time.

If you read the posts above, it's been said a couple of times that the dpkg output you posted looks normal. i.e. the "problem" is not visible.
 
Posts: 278 | Thanked: 209 times | Joined on Dec 2009
#46
I've completed the list of non-opt usage in the first post. Hope it's useful for some
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#47
Originally Posted by roamerjiang View Post
~ $ dpkg -l mplayer
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
rc mplayer 1.0svn4 The Ultimate Movie Player port for N900
Maybe I can help you guys here. If you are receiving this information when using dpkg then mplayer is removed from your system. That first field that says "RC" means that the package was removed, but configuration files left.

If dpkg --purge was used to remove the package, or the package was never installed, then the first two letters would be "un". If the package is installed, you would see "ii".

Another, more english way to view this, is using:

Code:
~$ dpkg --status xserver-xephyr
Package: xserver-xephyr
Status: unknown ok not-installed
Priority: optional
Section: x11
Pay attention to the status line... "not-installed". Evidently I don't have xserver-xephyr installed on my desktop. So those of you that are thinking mplayer did not remove from your system.. please try this command, or verify that your -l command says "rc" or "un". Either of these will indicated that yes, it has been removed.
 
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?
 
SubCore's Avatar
Posts: 850 | Thanked: 626 times | Joined on Sep 2009 @ Vienna, Austria
#49
"du" does NOT follow symbolic links, i just tested it.

btw, -P is the du-switch to deactivate symlinks, but it's not present on the tablet, and it's supposed to be default anyways.

what makes you say that du follows links? any hard evidence?
__________________
"What we perceive is not nature itself, but nature exposed to our method of questioning."
-- Werner Karl Heisenberg
 
Posts: 236 | Thanked: 223 times | Joined on Oct 2009 @ NE UK
#50
I didn't actually test this before posting the script, because I assumed du behaviour would be normal (i.e. don't follow symlinks) but here's a quick test which seems to show it is normal:

~# mkdir ttt
~# ln -s /usr/share ttt/test
~# ln -s /usr/share test2
~# du -s /usr/share
76716 /usr/share
~# du -s ttt test2 /usr/share
0 ttt
0 test2
76716 /usr/share
~#
the -x switch is not relevant to symlinks in particular. It's to tell du not to look at disk usage on separate filesystems which are mounted under the directory it's looking at.

So

du -s /

would give the disk usage for everything under / including /home and /home/user/MyDocs, which are separate filesystems, but

du -sx /

would only give the disk usage for the filesystem that / was part of.

Or, to give another example:

# du -s /home
2195060 /home
~# du -sx /home
204468 /home
The first result is bigger because it's counting /home/user/MyDocs. The second result doesn't look at that, because it's a separate mount to /home, and the -x switch has been given.

So in short the script shouldn't need any change to do the Right Thing in relation to symlinks

Edit: Nope, it did the Wrong Thing in relation to symlinked directories. Please get the new version (from the original place) if you're having trouble with that.

Last edited by kwotski; 2009-12-23 at 10:50.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 22:02.