Index of /~baro/sw/var/slack |
Name Last modified Size Description
Parent Directory 08-Nov-2006 16:00 - pkginfo++ 26-Oct-2004 15:08 9k pkginfo 26-Oct-2004 15:08 5k
# Copyright (C) 2004-2007 Moreno 'baro' Baricevic ## Licensed under GNU General Public License # http://www.gnu.org/copyleft/gpl.html # # Display info about installed packages. # # Inspired by Slackware pkgtool (some code has # been simply adapted and translated to bash). # # Dependencies: # bash, test/[, ls, sed, printf, less # #------------------------------------------------------------------------------------# Usage: pkginfo [ -l | PACKAGE ] -l list installed packages PACKAGE view PACKAGE info NOTES: when PACKAGE match more packages, a short list is displayed: pkginfo p # list of "p*" packages pkginfo pkgtools # "pkgtools" info pkginfo -l | grep "tool" # "*tool*" list (!match description too!) pkginfo -l | grep "^[^ ]*tool" # "*tool*" list (match only package name) #------------------------------------------------------------------------------------# Usage: pkginfo++ [ -l | -p PACKAGE | -f FILE | -h ] -l list installed packages -p PACKAGE view PACKAGE info -f FILE query package owning FILE -h display this message NOTES: - when PACKAGE match more packages, a short list is displayed: pkginfo++ -p p # list of "p*" packages pkginfo++ -p pkgtools # "pkgtools" info pkginfo++ -l | grep "tool" # "*tool*" list (!match description too!) pkginfo++ -l | grep "^[^ ]*tool" # "*tool*" list (match only package name) - the '$' character match the end of line pkginfo++ -f /usr/bin/time # package(s) that owns /usr/bin/time* pkginfo++ -f /usr/bin/time$ # package(s) that owns /usr/bin/time pkginfo++ -f `which ls` # package(s) that owns /bin/ls* pkginfo++ -f `which ls`$ # package(s) that owns /bin/ls - since unused in packages "FILE LIST" section, the first slash is always removed. Use '//' to force a starting slash (useful for partial paths). pkginfo++ -f time # match any file name that contains "time" pkginfo++ -f time$ # match any file name that ends with "time" pkginfo++ -f //time # match any file name that begins with "time" pkginfo++ -f //time$ # match any file named exactly "time" #------------------------------------------------------------------------------------# #EOF