Tuesday, April 15, 2014

Solaris: Sorting packages by size

Subject: FYI: sorting solaris packages by package size


i couldn't think of a way to sort packages in solaris by their installation size so....

z-csq:~ # pkginfo -l| perl -ne '$/=undef; foreach $t (split(m!\n\n!, )) { print "$3:$1:$2\n" if ( $t =~
m!PKGINST:\s+(\S+).*?NAME:\s+(.*?)\n.*?(\d+)\s+blocks!s) }'|sort -rn|head
479568:SUNWmlib:mediaLib - Shared Libraries
395134:SUNWacroread:Acrobat Reader for PDF files
291553:SFWtetex:tetex - A complete TeX distribution for UNIX
265384:SFWxmacs:XEmacs - text editor
190831:SUNWj5rt:JDK 5.0 Runtime Env. (1.5.0_07)
148773:SFWgcc34:gcc-3.4.2 - GNU Compiler Collection
122094:SUNWj3rt:J2SDK 1.4 runtime environment
116086:SFWemacs:emacs - GNU Emacs Editor
104325:SUNWgcc:gcc - The GNU C compiler
99222:SFWqt:qt - C++ GUI framework


in terms of saving space, acroread and emacs could be removed without impacting much of the OS, I would imagine

No comments:

Post a Comment