Linux2023. 5. 17. 10:13

 

# cat /sys/class/net/eth0/operstate
up
# macb e000b000.ethernet eth0: Link is Down
# cat operstate 
down
# macb e000b000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
# cat operstate
up

[링크 : https://serverfault.com/questions/15776/how-to-check-the-physical-status-of-an-ethernet-port-in-linux]

'Linux' 카테고리의 다른 글

리눅스 커맨드 라인에서 몇줄씩 건너뛰고 출력하기  (0) 2023.03.30
bash completion  (0) 2023.03.27
리눅스 키보드로 강제 종료하기  (0) 2023.03.10
shopt nohup  (0) 2023.01.27
리눅스 배터리 wear level  (0) 2023.01.04
Posted by 구차니

댓글을 달아 주세요

Linux2023. 3. 30. 10:12

라인단위로 저장되어 있는 파일이 길 경우

엑셀등의 파일에서 읽어들여 그래프 그리려고 하면 힘든데

일부만 추려내서 뽑으려고 할때 사용하려고 찾는 중

 

awk랑 sed로도 가능하다고

다만, n 번째가 클 경우 awk가 유리하다.

$ awk '!(NR%3)' file
$ sed -n 'n;n;p;' file

[링크 : http://underpop.online.fr/u/unix-school/guru-prasad/how-to-print-every-nth-line-in-file-in.htm]

'Linux' 카테고리의 다른 글

sysfs ethernet link status  (0) 2023.05.17
bash completion  (0) 2023.03.27
리눅스 키보드로 강제 종료하기  (0) 2023.03.10
shopt nohup  (0) 2023.01.27
리눅스 배터리 wear level  (0) 2023.01.04
Posted by 구차니

댓글을 달아 주세요

Linux2023. 3. 27. 14:12

전혀 연관없는 곳에서 발견

bash에서 tab 누르면 어떤 명령어는 하위 명령어에 대해서 자동 완성이 지원되는데

아래 경로의 completions 라는 경로에 파일명을 따라서 수행된다.

/usr/share/bash-completion

 

[링크 : https://github.com/Xilinx/gstreamer/blob/master/data/bash-completion/completions/gst-launch-1.0]

[링크 : https://kubernetes.io/ko/docs/tasks/tools/included/optional-kubectl-configs-bash-linux/]

'Linux' 카테고리의 다른 글

sysfs ethernet link status  (0) 2023.05.17
리눅스 커맨드 라인에서 몇줄씩 건너뛰고 출력하기  (0) 2023.03.30
리눅스 키보드로 강제 종료하기  (0) 2023.03.10
shopt nohup  (0) 2023.01.27
리눅스 배터리 wear level  (0) 2023.01.04
Posted by 구차니

댓글을 달아 주세요

Linux2023. 3. 10. 14:29

전원키 5초 이상 누르고 끄는 것 처럼 키 조합을 통해 종료하는게 있는건 처음 알았네

 

 Alt+PrtSc and pressed R, E, I, S, U, B.

[링크 : https://unix.stackexchange.com/questions/696886/altprtscreisub-doesnt-shut-down-computer]

 

The key combination consists of Alt+SysRq and another key, which controls the command issued

[링크 : https://en.wikipedia.org/wiki/Magic_SysRq_key]

 

qwerty는 상관없는데 dvorak 으로 쓰면 이상하게 꺼지는 경우가 있는 듯?

쿼티로 reisub 은, 드보락으로 p.cogx 가 된다

[링크 : https://www.nemonein.xyz/2023/01/7453/]

 

unRaw      (take control of keyboard back from X),
 tErminate (send SIGTERM to all processes, allowing them to terminate gracefully),
 kIll      (send SIGKILL to all processes, forcing them to terminate immediately),
  Sync     (flush data to disk),
  Unmount  (remount all filesystems read-only),
reBoot.

[링크 : https://askubuntu.com/questions/926461/whats-the-difference-between-the-magic-reisub-reset-and-holding-down-the-power]

'Linux' 카테고리의 다른 글

리눅스 커맨드 라인에서 몇줄씩 건너뛰고 출력하기  (0) 2023.03.30
bash completion  (0) 2023.03.27
shopt nohup  (0) 2023.01.27
리눅스 배터리 wear level  (0) 2023.01.04
mpx - Multi-pointer X  (0) 2022.12.27
Posted by 구차니

댓글을 달아 주세요

Linux/Ubuntu2023. 2. 10. 15:13

먼가 패키지 명이 웃긴데

alias나 심볼릭 링크 걸지 말고 아래 패키지를 설치하면 된다.

 

$ sudo apt install python-is-python3

[링크 : https://askubuntu.com/questions/320996/how-to-make-python-program-command-execute-python-3]

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

block caribou ?  (0) 2023.02.07
maas  (0) 2023.02.03
gTile  (0) 2023.01.31
ubuntu coredump 생성하기  (0) 2022.12.22
리눅스 블루투스 유틸리티 bluez-tools  (0) 2022.11.07
Posted by 구차니

댓글을 달아 주세요

Linux/Ubuntu2023. 2. 7. 10:46

우분투 18.04 사용중인데 쉘 버전이 3.28.4

$ gnome-shell --version
GNOME Shell 3.28.4

[링크 : https://askubuntu.com/questions/13348/how-do-i-check-my-version-of-gnome-shell]

 

해당 확장이 지원하는 버전은 3.36~43 이라는데 우분투 20.04 에서만 되는걸려나?

[링크 : https://extensions.gnome.org/extension/3222/block-caribou-36/]

 

+

귀찮아서 USB 허브에 USB 키보드 하나 연결해놓는걸로 그냥 해결 -_-

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

python3를 python으로 실행하기  (0) 2023.02.10
maas  (0) 2023.02.03
gTile  (0) 2023.01.31
ubuntu coredump 생성하기  (0) 2022.12.22
리눅스 블루투스 유틸리티 bluez-tools  (0) 2022.11.07
Posted by 구차니

댓글을 달아 주세요

Linux/Ubuntu2023. 2. 3. 18:54

mobility as a service - 차량

metal as a service - 클라우드

 

[링크 : https://maas.io/]

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

python3를 python으로 실행하기  (0) 2023.02.10
block caribou ?  (0) 2023.02.07
gTile  (0) 2023.01.31
ubuntu coredump 생성하기  (0) 2022.12.22
리눅스 블루투스 유틸리티 bluez-tools  (0) 2022.11.07
Posted by 구차니

댓글을 달아 주세요

Linux/Ubuntu2023. 1. 31. 14:46

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

block caribou ?  (0) 2023.02.07
maas  (0) 2023.02.03
ubuntu coredump 생성하기  (0) 2022.12.22
리눅스 블루투스 유틸리티 bluez-tools  (0) 2022.11.07
cpuid  (0) 2022.10.17
Posted by 구차니

댓글을 달아 주세요

Linux2023. 1. 27. 15:08

huponexit 는 off가 기본값인데

on으로 할경우 &로 백그라운드로 실행된 프로그램들이 세션 종료시 종료되지 않고 계속 실행된다고 한다.

$ shopt -s huponexit

위의 명령을 실행하면 set이 되어 on이 된다. (세션별로 적용된다)

 

$ shopt
autocd          off
cdable_vars     off
cdspell         off
checkhash       off
checkjobs       off
checkwinsize    on
cmdhist         on
compat31        off
compat32        off
compat40        off
compat41        off
compat42        off
compat43        off
complete_fullquote      on
direxpand       off
dirspell        off
dotglob         off
execfail        off
expand_aliases  on
extdebug        off
extglob         on
extquote        on
failglob        off
force_fignore   on
globasciiranges off
globstar        off
gnu_errfmt      off
histappend      on
histreedit      off
histverify      off
hostcomplete    off
huponexit       off
inherit_errexit off
interactive_comments    on
lastpipe        off
lithist         off
login_shell     off
mailwarn        off
no_empty_cmd_completion off
nocaseglob      off
nocasematch     off
nullglob        off
progcomp        on
promptvars      on
restricted_shell        off
shift_verbose   off
sourcepath      on
xpg_echo        off

 

[링크 : https://joonyon.tistory.com/entry/쉽게-설명한-nohup-과-백그라운드-명령어-사용법]

[링크 : https://rhr0916.tistory.com/62]

[링크 : https://m.blog.naver.com/2feelus/220363644372]

'Linux' 카테고리의 다른 글

bash completion  (0) 2023.03.27
리눅스 키보드로 강제 종료하기  (0) 2023.03.10
리눅스 배터리 wear level  (0) 2023.01.04
mpx - Multi-pointer X  (0) 2022.12.27
간단한 코어덤프 유발 프로그램  (1) 2022.12.22
Posted by 구차니

댓글을 달아 주세요

Linux2023. 1. 4. 17:17

어느걸 믿어야 하나...

$ sudo acpi -V
Battery 0: Unknown, 97%
Battery 0: design capacity 3530 mAh, last full capacity 3500 mAh = 99%
Adapter 0: on-line
Thermal 0: ok, 33.0 degrees C
Thermal 0: trip point 0 switches to mode critical at temperature 99.0 degrees C
Thermal 1: ok, 33.0 degrees C
Thermal 1: trip point 0 switches to mode critical at temperature 99.0 degrees C
Cooling 0: Processor 0 of 3
Cooling 1: B0D4 no state information available
Cooling 2: Processor 0 of 3
Cooling 3: x86_pkg_temp no state information available
Cooling 4: Processor 0 of 3
Cooling 5: Processor 0 of 3
Cooling 6: Processor 0 of 3
Cooling 7: SNS2 no state information available
Cooling 8: Processor 0 of 3
Cooling 9: iwlwifi_1 no state information available
Cooling 10: Processor 0 of 3
Cooling 11: intel_powerclamp no state information available
Cooling 12: Processor 0 of 3
Cooling 13: SNS1 no state information available

 

upower -i /org/freedesktop/UPower/devices/battery_BAT0
  native-path:          (null)
  power supply:         no
  updated:              1970년 01월 01일 (목) 오전 09시 00분 00초 (1672820873 seconds ago)
  has history:          no
  has statistics:       no
  unknown
    warning-level:       unknown
    battery-level:       unknown
    icon-name:          '(null)'

 

[링크 : https://www.cyberciti.biz/faq/linux-laptop-battery-status-temperature/]

'Linux' 카테고리의 다른 글

리눅스 키보드로 강제 종료하기  (0) 2023.03.10
shopt nohup  (0) 2023.01.27
mpx - Multi-pointer X  (0) 2022.12.27
간단한 코어덤프 유발 프로그램  (1) 2022.12.22
libgpiod  (0) 2022.12.16
Posted by 구차니

댓글을 달아 주세요