2

If I haven't got /etc/init.d/postgresql file in what package could I find it?

muru
  • 197,895
  • 55
  • 485
  • 740
fl00r
  • 1,393
  • 3
    postgresql-common or postgresql (the latter is the server package). You could discover this trivially yourself with http://packages.ubuntu.com/, and find out about that with a Google search like "find package containing file ubuntu". – Craig Ringer Dec 28 '14 at 14:27
  • 2
    e.g. http://packages.ubuntu.com/search?suite=precise&arch=any&searchon=contents&keywords=postgresql – Craig Ringer Dec 28 '14 at 14:28

2 Answers2

3

/etc/init.d/postgresql is provided by postgresql-common, according to the packages index.

muru
  • 197,895
  • 55
  • 485
  • 740
2

I assumed it was a typo in the Q, but searching the packages.ubuntu.com would find a file in any available package, whether it's installed or not.

If you wanted to find a file in a package that's already installed, you might find this dpkg (equivalent to dpkg-query) option useful:

   -S, --search filename-search-pattern...
          Search  for packages that own files corresponding to the given pattern.
          Standard shell wildchars can be used in the pattern.  This command will
          not  list  extra  files created by maintainer scripts, nor will it list
          alternatives.

Maybe try dpkg -S postgresql

See:

Xen2050
  • 8,705