awk '{print $2}' | uniq | sort
하면 2번째 열 내용만 추출해서 중복을 제거하고 내용을 정렬해서 출력함
'Linux' 카테고리의 다른 글
| awk NR, NF (0) | 2019.08.12 |
|---|---|
| smart trip temperature? (0) | 2019.08.05 |
| xz.. 느려!!! (0) | 2019.07.26 |
| musl / uclibc (0) | 2019.07.15 |
| hostnamectl (0) | 2019.07.10 |
awk '{print $2}' | uniq | sort
하면 2번째 열 내용만 추출해서 중복을 제거하고 내용을 정렬해서 출력함
| awk NR, NF (0) | 2019.08.12 |
|---|---|
| smart trip temperature? (0) | 2019.08.05 |
| xz.. 느려!!! (0) | 2019.07.26 |
| musl / uclibc (0) | 2019.07.15 |
| hostnamectl (0) | 2019.07.10 |
아놔.. 머가 꼬였나 드럽게 안되네.. ㅠㅠ
sudo service postgresql restart
로는 정상적으로 재시작 안되는 것으로 보여서(일단 포트를 바꾸어도 변경이 없음)
아래의 명령을 통해서 해야지 재시작이 되는 듯 하다.
$ pg_ctlcluster
Error: Usage: /usr/bin/pg_ctlcluster [-- ]
$ sudo pg_ctlcluster 11 main restart
----
$ sudo apt-get install postgresql
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료
다음의 추가 패키지가 설치될 것입니다 :
pgdg-keyring postgresql-11 postgresql-client-11 postgresql-client-common postgresql-common sysstat
제안하는 패키지:
postgresql-doc postgresql-doc-11 libjson-perl isag
다음 새 패키지를 설치할 것입니다:
pgdg-keyring postgresql postgresql-11 postgresql-client-11 postgresql-client-common postgresql-common sysstat
0개 업그레이드, 7개 새로 설치, 0개 제거 및 5개 업그레이드 안 함.
1,778 k바이트/16.1 M바이트 아카이브를 받아야 합니다.
이 작업 후 53.6 M바이트의 디스크 공간을 더 사용하게 됩니다.
계속 하시겠습니까? [Y/n] y
받기:1 http://kr.archive.ubuntu.com/ubuntu bionic/main amd64 sysstat amd64 11.6.1-1 [295 kB]
받기:2 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main amd64 pgdg-keyring all 2018.2 [10.7 kB]
받기:3 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main amd64 postgresql-client-common all 203.pgdg18.04+1 [85.3 kB]
받기:4 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main amd64 postgresql-client-11 amd64 11.4-1.pgdg18.04+1 [1,388 kB]
내려받기 1,778 k바이트, 소요시간 3초 (561 k바이트/초)
패키지를 미리 설정하는 중입니다...
Selecting previously unselected package pgdg-keyring.
(데이터베이스 읽는중 ...현재 196920개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack .../0-pgdg-keyring_2018.2_all.deb ...
Unpacking pgdg-keyring (2018.2) ...
Selecting previously unselected package postgresql-client-common.
Preparing to unpack .../1-postgresql-client-common_203.pgdg18.04+1_all.deb ...
Unpacking postgresql-client-common (203.pgdg18.04+1) ...
Selecting previously unselected package postgresql-client-11.
Preparing to unpack .../2-postgresql-client-11_11.4-1.pgdg18.04+1_amd64.deb ...
Unpacking postgresql-client-11 (11.4-1.pgdg18.04+1) ...
Selecting previously unselected package postgresql-common.
Preparing to unpack .../3-postgresql-common_203.pgdg18.04+1_all.deb ...
'/usr/bin/pg_config의 /usr/bin/pg_config.libpq-dev(으)로 전환, postgresql-common 패키지' 추가하는 중
Unpacking postgresql-common (203.pgdg18.04+1) ...
Selecting previously unselected package postgresql-11.
Preparing to unpack .../4-postgresql-11_11.4-1.pgdg18.04+1_amd64.deb ...
Unpacking postgresql-11 (11.4-1.pgdg18.04+1) ...
Selecting previously unselected package postgresql.
Preparing to unpack .../5-postgresql_11+203.pgdg18.04+1_all.deb ...
Unpacking postgresql (11+203.pgdg18.04+1) ...
Selecting previously unselected package sysstat.
Preparing to unpack .../6-sysstat_11.6.1-1_amd64.deb ...
Unpacking sysstat (11.6.1-1) ...
sysstat (11.6.1-1) 설정하는 중입니다 ...
Creating config file /etc/default/sysstat with new version
update-alternatives: using /usr/bin/sar.sysstat to provide /usr/bin/sar (sar) in auto mode
Created symlink /etc/systemd/system/multi-user.target.wants/sysstat.service → /lib/systemd/system/sysstat.service.
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.24) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
pgdg-keyring (2018.2) 설정하는 중입니다 ...
postgresql-client-common (203.pgdg18.04+1) 설정하는 중입니다 ...
postgresql-common (203.pgdg18.04+1) 설정하는 중입니다 ...
Creating config file /etc/postgresql-common/createcluster.conf with new version
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
en_us
ko
Removing obsolete dictionary files:
Created symlink /etc/systemd/system/multi-user.target.wants/postgresql.service → /lib/systemd/system/postgresql.service.
postgresql-client-11 (11.4-1.pgdg18.04+1) 설정하는 중입니다 ...
update-alternatives: using /usr/share/postgresql/11/man/man1/psql.1.gz to provide /usr/share/man/man1/psql.1.gz (psql.1.gz) in auto mode
postgresql-11 (11.4-1.pgdg18.04+1) 설정하는 중입니다 ...
Creating new PostgreSQL cluster 11/main ...
/usr/lib/postgresql/11/bin/initdb -D /var/lib/postgresql/11/main --auth-local peer --auth-host md5
이 데이터베이스 시스템에서 만들어지는 파일들은 그 소유주가 "postgres" id로
지정될 것입니다. 또한 이 사용자는 서버 프로세스의 소유주가 됩니다.
데이터베이스 클러스터는 "ko_KR.UTF-8" 로케일으로 초기화될 것입니다.
기본 데이터베이스 인코딩은 "UTF8" 인코딩으로 설정되었습니다.
initdb: "ko_KR.UTF-8" 로케일에 알맞은 전문검색 설정을 찾을 수 없음
기본 텍스트 검색 구성이 "simple"(으)로 설정됩니다.
자료 페이지 체크섬 기능 사용 하지 않음
이미 있는 /var/lib/postgresql/11/main 디렉터리의 액세스 권한을 고치는 중 ...완료
하위 디렉터리 만드는 중 ...완료
max_connections 초기값을 선택하는 중 ...100
기본 shared_buffers를 선택하는 중... 128MB
selecting default timezone ... Asia/Seoul
사용할 동적 공유 메모리 관리방식을 선택하는 중 ... posix
환경설정 파일을 만드는 중 ...완료
부트스트랩 스크립트 실행 중 ... 완료
부트스트랩 다음 초기화 작업 중 ... 완료
자료를 디스크에 동기화 하는 중 ... 완료
작업완료. 이제 다음 명령을 이용해서 서버를 가동 할 수 있습니다:
pg_ctlcluster 11 main start
Ver Cluster Port Status Owner Data directory Log file
11 main 5432 down postgres /var/lib/postgresql/11/main /var/log/postgresql/postgresql-11-main.log
update-alternatives: using /usr/share/postgresql/11/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode
postgresql (11+203.pgdg18.04+1) 설정하는 중입니다 ...
Processing triggers for systemd (237-3ubuntu10.24) ...
Processing triggers for ureadahead (0.100.0-21) ...
$ pg_ctlcluster 11 main start
Warning: the cluster will not be running as a systemd service. Consider using systemctl:
sudo systemctl start postgresql@11-main
Error: You must run this program as the cluster owner (postgres) or root
$ sudo pg_ctlcluster 11 main start
| ubuntu virtual desktop (0) | 2019.08.28 |
|---|---|
| ubuntu 18.04 fsck 예약(?) (0) | 2019.08.27 |
| bash-completion (0) | 2019.07.09 |
| 우분투 리눅스에 카카오톡 깔기 (2) | 2019.07.09 |
| ubuntu sftp with nautilius (0) | 2019.06.03 |
압축 푸는게 조금 더 빠르고(pigz)
| $ time pigz -k -d ClinVarFullRelease_2019-07.xml.gz real 0m35.153s user 0m29.345s sys 0m10.911s |
압축하는건 역시 조금 느리다(pigz)
| $ time pigz ClinVarFullRelease_2019-07.xml real 0m58.519s user 3m27.477s sys 0m8.546s |
xz는.. gzip 대비 1/3 용량이 나오지만 압축속도는 거의.. 30배 느리다?
| $ time xz -z -k ClinVarFullRelease_2019-07.xml real 28m47.209s user 28m40.114s sys 0m6.532s |
원본 텍스트 8.2GB(XML)
gzip 압축 약 680MB
xz 압축 약 260MB
| 8.2G 7월 26 16:11 ClinVarFullRelease_2019-07.xml 679M 7월 26 16:11 ClinVarFullRelease_2019-07.xml.gz 262M 7월 26 16:11 ClinVarFullRelease_2019-07.xml.xz |
| smart trip temperature? (0) | 2019.08.05 |
|---|---|
| uniq (0) | 2019.07.30 |
| musl / uclibc (0) | 2019.07.15 |
| hostnamectl (0) | 2019.07.10 |
| command line xml parse (0) | 2019.07.03 |
alpine 리눅스에서 채택하고 있는 라이브러리
uclibc와는 좀 다른 접근방법으로 경량 리눅스를 만드는데 쓰인다고
| uniq (0) | 2019.07.30 |
|---|---|
| xz.. 느려!!! (0) | 2019.07.26 |
| hostnamectl (0) | 2019.07.10 |
| command line xml parse (0) | 2019.07.03 |
| 브릿지를 이용하여 복수개의 네트워크 카드를 허브로 사용하기 (0) | 2019.07.03 |
| xz.. 느려!!! (0) | 2019.07.26 |
|---|---|
| musl / uclibc (0) | 2019.07.15 |
| command line xml parse (0) | 2019.07.03 |
| 브릿지를 이용하여 복수개의 네트워크 카드를 허브로 사용하기 (0) | 2019.07.03 |
| wget -m (mirror) (0) | 2019.06.26 |
하위 명령까지 자동완성해주도록 도와주는 착한(?)녀석
[링크 : https://www.cyberciti.biz/faq/add-bash-auto-completion-in-ubuntu-linux/]
| ubuntu 18.04 fsck 예약(?) (0) | 2019.08.27 |
|---|---|
| ubuntu postgresql 실행 (0) | 2019.07.30 |
| 우분투 리눅스에 카카오톡 깔기 (2) | 2019.07.09 |
| ubuntu sftp with nautilius (0) | 2019.06.03 |
| 리눅스 gdm 키맵 변경 (0) | 2019.05.10 |
먼가 오류가 나긴 했찌만 꾿꾿히 설치 완료인걸로
근데 한글 입력시에 IME에 충돌이 나는지 바로바로 입력이 되진 않네..
winecfg로 win2000이 기본으로 된걸 win7으로 바꾸어 주어야 카톡이 실행된다.

[링크 : https://hiseon.me/linux/ubuntu/ubuntu-kakaotalk/]
+
Win7 + 자동 로그인 문제인가?
이상하게 실행하면 바로 뻗어버려서 xp 버전 + winecfg로 winXP로 맞추고
자동로그인 안하니 오히려 더 가볍게 잘 작동하는 느낌?(물론 IME도 여전하지만)
| ubuntu postgresql 실행 (0) | 2019.07.30 |
|---|---|
| bash-completion (0) | 2019.07.09 |
| ubuntu sftp with nautilius (0) | 2019.06.03 |
| 리눅스 gdm 키맵 변경 (0) | 2019.05.10 |
| ubuntu 18.04 hibernate 적용하기 (0) | 2019.05.06 |
centos7 에서는
/var/log/secure에 존재하네
로그인 시도가 보이는데 fail2ban을 해놔야 하려나..
[링크 : https://www.tecmint.com/find-failed-ssh-login-attempts-in-linux/]
| ls 퍼미션에 .의 의미 (0) | 2020.04.01 |
|---|---|
| centos7 minimal / X11 사용하기 (0) | 2020.02.04 |
| centos7 USB 설치 중 /dev/root dose not exist 에러 (0) | 2019.07.02 |
| httpd + php + selinux.. (0) | 2019.03.20 |
| 'abrt-cli status' timed out (0) | 2019.03.01 |
libxml2를 깔다보니 xmllint가 끌려왔는데
내가 원하는 속성을 한번더 출력하지 않으면 더 행복할거 같은데...
| xmllint --xpath '//element/@attribute' file.xml xmlstarlet sel -t -v "//element/@attribute" file.xml xpath -q -e '//element/@attribute' file.xml xidel -se '//element/@attribute' file.xml saxon-lint --xpath '//element/@attribute' file.xml |
[링크 : https://stackoverflow.com/questions/15461737/how-to-execute-xpath-one-liners-from-shell]
| musl / uclibc (0) | 2019.07.15 |
|---|---|
| hostnamectl (0) | 2019.07.10 |
| 브릿지를 이용하여 복수개의 네트워크 카드를 허브로 사용하기 (0) | 2019.07.03 |
| wget -m (mirror) (0) | 2019.06.26 |
| bash argument list is too long (0) | 2019.06.25 |
말이 기네
간단하게 br0 인터페이스로 여러개의 NIC을 단순 허브로 사용하겠다~ 라는것
근데 막상해보니 자기 자신(eth0)의 ip가 먹통이 되듯 외부로 안나가고 외부로 부터 ping도 안되지만
eth1 쪽으로 다른 pc를 물렸을때 다른 pc는 정상적으로 인터넷이 된다.. (이게 머야)
| sudo brctl addbr br0 sudo brctl addif eth0 sudo brctl addif eth1 sudo brctl stp br0 off sudo brctl setageing br0 0 sudo brctl setfd br0 0 sudo ifconfig br0 up |
[링크 : https://sugerent.tistory.com/368]
[링크 : https://techglimpse.com/convert-linux-bridge-hub-vm-interospection/]
| hostnamectl (0) | 2019.07.10 |
|---|---|
| command line xml parse (0) | 2019.07.03 |
| wget -m (mirror) (0) | 2019.06.26 |
| bash argument list is too long (0) | 2019.06.25 |
| sgrep (0) | 2019.06.24 |