0

Is there a practical difference between these two commands?

/home/pkaramol/Desktop
$ sudo apt-file search logrotate.conf
logrotate: /etc/logrotate.conf
logrotate: /usr/share/man/man5/logrotate.conf.5.gz
petitboot: /etc/logrotate.d/petitboot/logrotate.conf
rsync: /usr/share/doc/rsync/examples/logrotate.conf.rsync
unicorn: /usr/share/doc/unicorn/examples/logrotate.conf

/home/pkaramol/Desktop
$ sudo apt-file find logrotate.conf
logrotate: /etc/logrotate.conf
logrotate: /usr/share/man/man5/logrotate.conf.5.gz
petitboot: /etc/logrotate.d/petitboot/logrotate.conf
rsync: /usr/share/doc/rsync/examples/logrotate.conf.rsync
unicorn: /usr/share/doc/unicorn/examples/logrotate.conf
/home/pkaramol/Desktop/centos_7

According to the help:

search|find Search files in packages

pkaramol
  • 2,587
  • 4
  • 36
  • 71

1 Answers1

1

From man apt-file:

search is

       Search in which package a file is included. A list of all packages
       containing the pattern pattern is returned.

       Since Contents files does not contain directories, the pattern must
       match (part of a) file name.

       By default, the search action interprets its pattern as if
       --substring-match was specified.

And find is

Alias for search.

So both are same.

Prvt_Yadav
  • 5,732
  • 7
  • 32
  • 48