Find PostgreSQL Data Directory

2024-01-19

The following snippet finds where the PostgreSQL database directory is located.

psql -U postgres -c 'SHOW data_directory';