'Linux'에 해당되는 글 782건

  1. 2019.08.12 awk NR, NF
  2. 2019.08.05 smart trip temperature?
  3. 2019.07.30 uniq
  4. 2019.07.30 ubuntu postgresql 실행
  5. 2019.07.26 xz.. 느려!!!
  6. 2019.07.15 musl / uclibc
  7. 2019.07.10 hostnamectl
  8. 2019.07.09 bash-completion
  9. 2019.07.09 우분투 리눅스에 카카오톡 깔기 2
  10. 2019.07.07 리눅스 로그인 실패 로그 2
Linux2019. 8. 12. 13:14

NR(number of Record?)

NF(number of Field?)

[링크 : https://ko.wikibooks.org/wiki/예제로_배우는_AWK/필드와_레코드]

 

The variable NF is set to the total number of fields in the input record.

[링크 : https://linux.die.net/man/1/awk]

'Linux' 카테고리의 다른 글

linux 수동 trim  (0) 2019.08.16
jq - json in linux command line  (0) 2019.08.16
smart trip temperature?  (0) 2019.08.05
uniq  (0) 2019.07.30
xz.. 느려!!!  (0) 2019.07.26
Posted by 구차니
Linux2019. 8. 5. 18:20

smart tool에서 보다 보니 

current temperature와

drive trip temperature 두개가 나오는데

이것이 무엇이다 라고 명확하게 정의된건 못 찾았지만..

 

구글 북스를 통해서 보면..

아마도 하드웨어 적으로 정해진 최대온도인 것으로 보인다.

 

[링크 : https://serverfault.com/questions/614717/]

[링크 : https://www.backblaze.com/blog/hard-drive-temperature-does-it-matter/ ]

[링크 : https://books.google.co.kr/books?id=aBPTCQAAQBAJ&pg=PA687&lpg=PA687&dq=Drive+Trip+Temperature&source=bl&ots=WLBN-kCXKh&sig=ACfU3U1p0EMPdPxUppgkAnIzv1piEY4pUg&hl=ko&sa=X&ved=2ahUKEwjNnJfLwevjAhWMIqYKHZ0DBBw4ChDoATAEegQICRAB#v=onepage&q=Drive%20Trip%20Temperature&f=false]


모르겠다 먼지..

'Linux' 카테고리의 다른 글

jq - json in linux command line  (0) 2019.08.16
awk NR, NF  (0) 2019.08.12
uniq  (0) 2019.07.30
xz.. 느려!!!  (0) 2019.07.26
musl / uclibc  (0) 2019.07.15
Posted by 구차니
Linux2019. 7. 30. 15:04

awk '{print $2}' | uniq | sort

 

하면 2번째 열 내용만 추출해서 중복을 제거하고 내용을 정렬해서 출력함

 

[링크 : https://zetawiki.com/wiki/리눅스_중복행_제거_uniq]

[링크 : https://linux.die.net/man/1/uniq]

'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
Posted by 구차니
Linux/Ubuntu2019. 7. 30. 14:20

아놔.. 머가 꼬였나 드럽게 안되네.. ㅠㅠ

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

'Linux > Ubuntu' 카테고리의 다른 글

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
Posted by 구차니
Linux2019. 7. 26. 17:25

압축 푸는게 조금 더 빠르고(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

'Linux' 카테고리의 다른 글

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
Posted by 구차니
Linux2019. 7. 15. 15:50

alpine 리눅스에서 채택하고 있는 라이브러리

uclibc와는 좀 다른 접근방법으로 경량 리눅스를 만드는데 쓰인다고

 

[링크 : http://www.etalabs.net/compare_libcs.html]

'Linux' 카테고리의 다른 글

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
Posted by 구차니
Linux2019. 7. 10. 16:56

엥.. 이런 명령어도 있었나? 첨보네

 

[링크 : https://zetawiki.com/wiki/리눅스_hostnamectl]

'Linux' 카테고리의 다른 글

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
Posted by 구차니
Linux/Ubuntu2019. 7. 9. 15:40

하위 명령까지 자동완성해주도록 도와주는 착한(?)녀석

 

[링크 : https://www.cyberciti.biz/faq/add-bash-auto-completion-in-ubuntu-linux/]

'Linux > Ubuntu' 카테고리의 다른 글

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
Posted by 구차니
Linux/Ubuntu2019. 7. 9. 09:14

먼가 오류가 나긴 했찌만 꾿꾿히 설치 완료인걸로

근데 한글 입력시에 IME에 충돌이 나는지 바로바로 입력이 되진 않네..

 

winecfg로 win2000이 기본으로 된걸 win7으로 바꾸어 주어야 카톡이 실행된다.

[링크 : https://hiseon.me/linux/ubuntu/ubuntu-kakaotalk/]

 

+

Win7 + 자동 로그인 문제인가?

이상하게 실행하면 바로 뻗어버려서 xp 버전 + winecfg로 winXP로 맞추고

자동로그인 안하니 오히려 더 가볍게 잘 작동하는 느낌?(물론 IME도 여전하지만)

'Linux > Ubuntu' 카테고리의 다른 글

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
Posted by 구차니
Linux/centos2019. 7. 7. 14:28

centos7 에서는

/var/log/secure에 존재하네

 

로그인 시도가 보이는데 fail2ban을 해놔야 하려나..

 

[링크 : https://www.tecmint.com/find-failed-ssh-login-attempts-in-linux/]

'Linux > centos' 카테고리의 다른 글

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
Posted by 구차니