Search This Blog

Monday, October 15, 2007

Some usefull Gentoo command line instructions

With this command is possible to list all the installed packages of a certain category, that are up to date or that need to be updated.

eix -A media-video | grep -E "\[[IU]\]"

For the example category, I choosed, I got this output.

[I] media-video/dvdauthor
[I] media-video/ffmpeg
[I] media-video/lives
[I] media-video/mjpegtools
[I] media-video/mkvtoolnix
[I] media-video/mpeg2vidcodec
[I] media-video/mplayer
[I] media-video/nvidia-settings
[I] media-video/totem
[I] media-video/vcdimager
[I] media-video/xanim
[I] media-video/xine-ui

This is a variant of the previous command, that lists the packages with the description.

eix -A media-video | grep -iE -A 4 "\[[IU]\]" | awk '{ if ($1 == "[U]" || $1 == "[I]") { print $0 } else { if ($1 == "Description:") { print substr( $0, index( $0, ":" ) + 1 ) } } }'

And this is the output I got.

[I] media-video/dvdauthor

         Tools for generating DVD files to be played on standalone DVD players
[I] media-video/ffmpeg
         Complete solution to record, convert and stream audio and video. Includes libavcodec. SVN revision 9330
[I] media-video/lives
         Linux Video Editing System
[I] media-video/mjpegtools[I] media-video/mkvtoolnix
         Tools to create, alter, and inspect Matroska files
[I] media-video/mpeg2vidcodec
         MPEG Library
[I] media-video/mplayer
         Media Player for Linux
[I] media-video/nvidia-settings
         NVIDIA Linux X11 Settings Utility
[I] media-video/totem
         Media player for GNOME
[I] media-video/vcdimager
         GNU VCDimager
[I] media-video/xanim
         program for playing a wide variety of animation, audio and video formats
[I] media-video/xine-ui
         Xine movie player

And if you find any package in the category that needs to update, you can update all of them in a single command.

emerge -p `eix -A media-video | grep -iE "\[U\]" | awk '{ if ( $1 == "[U]" ) { print $2 } }'`

Control the output and, if it is correct, run the command once more without `-p' option to actually complete it.

No comments:

Post a Comment