notes/bash.md
Paul Trowbridge ec201342f8 adds
2018-07-27 17:05:18 -04:00

952 B

Update PostgreSQL

wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add -

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ lsb_release -cs-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'

sudo apt-get update

sudo apt-get install postgres-10

sudo su - postgres

psql

Set PSQL defaults

put .psqlrc in home directory \set x '\setenv PAGER less' \set xx '\setenv PAGER 'pspg -bX --no-mouse''

Size of directory: du -hcs //mnt/c/PostgreSQL/cassandra30/

list lines in file wc file

General tasks

wc - print line counts

free - memory usage

du - disk space by file