I am trying to install postgree on Ubuntu 14 as explained here: http://www.postgresql.org/download/linux/ubuntu/
And trying to create file inside /etc/apt/sources.list.d directory:
sudo echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" > /etc/apt/sources.list.d/pgdg.list
but get this error:
bash: /etc/apt/sources.list.d/pgdg.list: Permission denied
How I should do that?
You should refer to this answered question : "The redirection is done by the shell before sudo is even started. "