You are not logged in.

#1 2008-12-25 02:54:22

turingcat
Member
Registered: 2008-08-14
Posts: 18

can i use * or ? for pacman?

can i use pacman -Qi gnome* to query all of packages begined with gnome?some times i can not remember the exactlly names of packages~
i try to use * but failed.how to do it?

just from ubuntu to arch~really a newer~thx for help!

Offline

#2 2008-12-25 03:10:17

Pudge
Arch Linux f@h Team Member
Registered: 2006-01-23
Posts: 300

Re: can i use * or ? for pacman?

Hi turingcat.

The command pacman -Q will list every package installed on your computer.  Simply pipe the output of this command to grep like this

$ pacman -Q | grep -i "gnome"

and it will list every package with "gnome" in it.  The pipe command | allows you to send the output of one command to the input of another command.  In this case, the output of the pacman -Q command is sent to the input of the grep command.  The grep command is a very powerful search command and well worth spending some time learning it.  See man grep for more options for grep, such as  -i for ignore case, and other useful features.  By using the -i ignore case parameter, this will find all instances of gnome, or Gnome, or gnOme, etc.

HTH

Pudge

Last edited by Pudge (2008-12-25 03:27:27)

Offline

#3 2008-12-25 03:35:22

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: can i use * or ? for pacman?

Oldest bug in our bug tracker: http://bugs.archlinux.org/task/1561  Implementing that should implement it for the -Q option too

Offline

#4 2008-12-25 04:37:43

turingcat
Member
Registered: 2008-08-14
Posts: 18

Re: can i use * or ? for pacman?

i know that use "|" and grep ,but i thought that should be a basic feature~
thx ~~

Offline

#5 2008-12-25 05:12:39

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: can i use * or ? for pacman?

Patches welcome.

Offline

#6 2008-12-25 06:51:16

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: can i use * or ? for pacman?

pacman -Qi $(pacman -Qqs gnome)

(assuming you want the info output)

Last edited by Xyne (2008-12-25 06:51:56)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB