How to install PostgreSQL 10 on Ubuntu Xenial 16.04 LTS

For installing the new version of PostgreSQL 10 on Ubuntu Xenial 16.04 LTS :

 

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main 10" > /etc/apt/sources.list.d/pgdg.list'
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg-testing main 10" >> /etc/apt/sources.list.d/pgdg.list'
sudo apt-get install wget ca-certificates
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install postgresql-10 pgadmin3

Source:

https://wiki.postgresql.org/wiki/Apt

https://wiki.postgresql.org/wiki/Apt/FAQ#I_want_to_try_the_beta_version_of_the_next_PostgreSQL_release

Copying files without overwriting destination

rsync is used by to copy files remotely and locally

rsync -avzu /home/x /y

-u = do not overwrite a file at the destination, if it is modified

Source: http://superuser.com/questions/409980/sync-two-local-folders-in-bash

Or  you can use

cp -r -n /home/x /y

-n, –no-clobber
do not overwrite an  existing  file  (overrides  a  previous  -i
option)