Comparing the pkg search and pkg contents Commands
         
         Like the pkg contents command, the pkg search command examines the contents of packages. While the pkg contents command returns the contents, the pkg search command returns the names of packages that match the search query. The following table shows some of the similarities and differences between these two commands.
               
Table 2-1 
pkg search and pkg contents Comparison
                  
| pkg search | pkg contents | 
|---|---|
                              
                              
  | 
                           
                              
                              
  | 
                        
Tip:
Use thepkg contents command to show the contents of a specified package, and use the pkg search command to show packages that match a query. If you know which package delivers the content that you are interested in, use the pkg contents command.