If I haven't got /etc/init.d/postgresql
file in what package could I find it?
Asked
Active
Viewed 1,242 times
2
2 Answers
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:
- Ubuntu server guide on dpkg: https://help.ubuntu.com/lts/serverguide/dpkg.html
man dpkg
page: http://manpages.ubuntu.com/manpages/trusty/man1/dpkg.1.htmlman dpkg-query
page: http://manpages.ubuntu.com/manpages/trusty/man1/dpkg-query.1.html

Xen2050
- 8,705
-
You can then reinstall it with 'sudo apt-get install --reinstall postgresql' – jhilmer Dec 28 '14 at 14:54
postgresql-common
orpostgresql
(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