notes/bash.md

29 lines
758 B
Markdown
Raw Normal View History

2018-04-12 14:00:19 -04:00
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
2018-05-07 17:15:30 -04:00
psql
Set PSQL defaults
-------------------------------------------------------------------------------------------------------------
put .psqlrc in home directory
\set x '\\setenv PAGER less'
2018-07-11 14:23:47 -04:00
\set xx '\\setenv PAGER \'pspg -bX --no-mouse\''
Size of directory: `du -hcs //mnt/c/PostgreSQL/cassandra30/`
list lines in file `wc file`