How do I sort all installed packages by size? - Slackware

This is a discussion on How do I sort all installed packages by size? - Slackware ; Hello, I can do: ls /var/log/packages -alS will this give me a valid indication of which packages take the most space or am I going the wrong way? Thank you -- Ottavio http://www.pledgebank.com/boycottvista...

+ Reply to Thread
Results 1 to 3 of 3

Thread: How do I sort all installed packages by size?

  1. How do I sort all installed packages by size?

    Hello,

    I can do:

    ls /var/log/packages -alS

    will this give me a valid indication of which packages take the most space
    or am I going the wrong way?

    Thank you

    --
    Ottavio
    http://www.pledgebank.com/boycottvista


  2. Re: How do I sort all installed packages by size?

    On 2007-12-21 Fri 11:23:51, Ottavio Caruso wrote:
    > Hello,
    >
    > I can do:
    >
    > ls /var/log/packages -alS
    >
    > will this give me a valid indication of which packages take the most space
    > or am I going the wrong way?
    >


    That will give you the packages that have the longest file listings or
    descriptions or whatever and doesn't necessarily equate to size. Try
    something like

    grep ^UNCOMPRESSED /var/log/packages/* | sort -t: -nk3 # | cut -d: -f1

    (The commented section is if you only want the package names.)

  3. Re: How do I sort all installed packages by size?

    On Fri, 21 Dec 2007 17:51:33 GMT, slakmagik wrote:

    >On 2007-12-21 Fri 11:23:51, Ottavio Caruso wrote:
    >> Hello,
    >>
    >> I can do:
    >>
    >> ls /var/log/packages -alS
    >>
    >> will this give me a valid indication of which packages take the most space
    >> or am I going the wrong way?
    >>

    >
    >That will give you the packages that have the longest file listings or
    >descriptions or whatever and doesn't necessarily equate to size. Try
    >something like
    >
    >grep ^UNCOMPRESSED /var/log/packages/* | sort -t: -nk3 # | cut -d: -f1


    or:

    ~$ grep "UNCOMPRESSED " /var/log/packages/* | \
    awk '{sub(/\/var\/log\/packages\//,"");split($0,k,":");printf"%8d kB %s\n",k[3],k[1]}'|\
    sort -n
    40 kB diffstat-1.43-i486-1
    50 kB inetd-1.79s-i486-7
    50 kB rzip-2.1-i486-1
    ....
    58670 kB glibc-i18n-2.3.6-noarch-6
    83290 kB glibc-2.3.6-i486-6
    86360 kB jre-1_5_0_09-i586-1

    (for slack-11)

    Grant.
    --
    http://bugsplatter.mine.nu/

+ Reply to Thread