'Linux'에 해당되는 글 775건

  1. 2019.08.27 ubuntu 18.04 fsck 예약(?)
  2. 2019.08.16 linux 수동 trim
  3. 2019.08.16 jq - json in linux command line
  4. 2019.08.12 awk NR, NF
  5. 2019.08.05 smart trip temperature?
  6. 2019.07.30 uniq
  7. 2019.07.30 ubuntu postgresql 실행
  8. 2019.07.15 musl / uclibc
  9. 2019.07.10 hostnamectl
  10. 2019.07.09 bash-completion
Linux/Ubuntu2019. 8. 27. 14:07

이라고 하긴 제목이 이상한데..

일단은 18.04에서는 기본적으로 fsck를 실행하도록 예약(?)이 되어있지 않는 것으로 보인다.

 

max. mount count가 -1이라 자동으로 하진 않는데..

$ sudo tune2fs -l /dev/sda1 | grep -i count
Inode count:              14655488
Block count:              58607360
Reserved block count:     2930368
Mount count:              53
Maximum mount count:      -1

[링크 : https://linuxconfig.org/how-to-force-fsck-to-check-filesystem-after-system-reboot-on-linux]

 

애가 상태 이상해지면

sudo touch /forcefsck 

해주는수 밖에 없나?

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

ubuntu 18.04 wayland와 ubuntu session  (0) 2019.08.28
ubuntu virtual desktop  (0) 2019.08.28
ubuntu postgresql 실행  (0) 2019.07.30
bash-completion  (0) 2019.07.09
우분투 리눅스에 카카오톡 깔기  (2) 2019.07.09
Posted by 구차니
Linux2019. 8. 16. 16:30

$ fstrim / -v
fstrim: /: FITRIM ioctl failed: 명령을 허용하지 않음

$ sudo fstrim / -v
/: 160.4 GiB (172228952064 bytes) trimmed

 

[링크 : https://blog.naver.com/revuahn/221056734236]

'Linux' 카테고리의 다른 글

awk 구분자 탭으로 인식시키기  (0) 2019.09.02
awk 특정 열 제외하기  (0) 2019.09.02
jq - json in linux command line  (0) 2019.08.16
awk NR, NF  (0) 2019.08.12
smart trip temperature?  (0) 2019.08.05
Posted by 구차니
Linux2019. 8. 16. 00:09

json 을 커맨드 라인에서 처리할 수 있게 해주는 유틸

 

-r은 raw로 출력

oncotree 에서 api로 받은것 중에서 code 영역만 추출

 

jq -r '.[].code' tumorTypes > code

[링크 : https://blog.outsider.ne.kr/1202]

 

+

sudo apt-get install jq

[링크 : https://stedolan.github.io/jq/download/]

[링크 : https://stedolan.github.io/jq/]

'Linux' 카테고리의 다른 글

awk 특정 열 제외하기  (0) 2019.09.02
linux 수동 trim  (0) 2019.08.16
awk NR, NF  (0) 2019.08.12
smart trip temperature?  (0) 2019.08.05
uniq  (0) 2019.07.30
Posted by 구차니
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
musl / uclibc  (0) 2019.07.15
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
musl / uclibc  (0) 2019.07.15
hostnamectl  (0) 2019.07.10
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
musl / uclibc  (0) 2019.07.15
hostnamectl  (0) 2019.07.10
command line xml parse  (0) 2019.07.03
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. 15. 15:50

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

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

 

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

'Linux' 카테고리의 다른 글

smart trip temperature?  (0) 2019.08.05
uniq  (0) 2019.07.30
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' 카테고리의 다른 글

uniq  (0) 2019.07.30
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 구차니