I have two questions-
- List all packages order by name
- Search for a specific package that is intalled or not?
I have two questions-
From man sort
NAME top
sort - sort lines of text filesSYNOPSIS top
sort [OPTION]... [FILE]... sort [OPTION]... --files0-from=FDESCRIPTION top
Write sorted concatenation of all FILE(s) to standard output. With no FILE, or when FILE is -, read standard input. Mandatory arguments to long options are mandatory for short options too. Ordering options:
From man yum
yum list installed [glob_exp1] [...]
List the packages specified by args. If an argument does not match the name of an available package, it is assumed to be a shell-style glob and any matches are printed.
So,
To list all packages order by name
yum list installed | sort
Search for a specific package that is intalled or not:
I can not check this since I do not have a CentOS system at disposal, but from man pages this should work:
yum list installed $packageName
What will return the result you look for is this:
yum list installed | grep $packageName