uptime command

linux의 uptime 명령을 통해 시스템의 운영시간 및 평균 시스템 부하를 확인 할 수 있습니다. $>uptime 14:05:49 up 1 day, 23:55, 1 user, load average: 1.43, 0.94, 0.82 위에 출력된 내용은 부분별로 다음 정보를 의미 합니다. 14:05:49 : 현재시간 up 1 day, 23:55 : 시스템 시작후 운영된 시간 1 user : 시스템에 현재 로그인된 사용자 수 로그인된 사용자 정보는 /var/run/utmp 파일을 참조한다. w, who 명령어를 통해서 상세 정보를 확인 할 수 있다.

Continue reading

Shell에 설정된 alias 대신 원래 명령어를 실행하는 여러가지 방법들. $> alias ls=exa ls alias가 설정되어 있을 경우 ls 명령어를 입력하면 exa 명령어가 실행된다. 이를 alias 설정 이전 ls 명령어로 실행할 수 있는 방법은 다음과 같다. 절대 경로를 이용하는 방법. $> whereis ls ls: /bin/ls /usr/share/man/man1/ls.1.gz $> /bin/ls command 명령을 이용하는 방법. $> command ls “(double quotation)을 이용하는 방법. $> "ls" ‘(single quotation)을 이용하는 방법. $> 'ls' \(backslash)를 이용하는 방법. $> \ls

Continue reading

whereis command

linux의 whereis는 입력한 명령어(command)의 실행파일, 소스, Man 페이지 위치를 찾는 명령어입니다. whereis –help $> whereis --help Usage: whereis [options] [-BMS <dir>... -f] <name> Locate the binary, source, and manual-page files for a command. Options: -b search only for binaries -B <dirs> define binaries lookup path -m search only for manuals and infos -M <dirs> define man and info lookup path -s search only for sources -S <dirs> define sources lookup path -f terminate <dirs> argument list -u search for unusual entries -l output effective lookup paths For more details see whereis(1).

Continue reading

which command

linux의 which는 입력한 명령어를 $PATH에 설정된 범위에서 검색하여 찾아주는 명령어입니다. 옵션 없이 사용할 경우 먼저 매치되는 명령어를 보여 줍니다. $> which ls ls: aliased to exa -a 옵션을 통해 매치는 명령어가 여러개 있을 경우 모두 보여 줍니다. $> which -a ls /ls: aliased to exa /bin/ls

Continue reading

tee

linux 의 tee 명령어는 표준 입력을 받아 표준 출력(Console)과 파일을 만들어주는 명령어입니다. $> tee --help Usage: tee [OPTION]... [FILE]... Copy standard input to each FILE, and also to standard output. -a, --append append to the given FILEs, do not overwrite -i, --ignore-interrupts ignore interrupt signals -p diagnose errors writing to non pipes --output-error[=MODE] set behavior on write error. See MODE below --help display this help and exit --version output version information and exit MODE determines behavior with write errors on the outputs: 'warn' diagnose errors writing to any output 'warn-nopipe' diagnose errors writing to any output not a pipe 'exit' exit on error writing to any output 'exit-nopipe' exit on error writing to any output not a pipe The default MODE for the -p option is 'warn-nopipe'.

Continue reading

rustup을 이용하여 Rust 설치하기. 다음 명령어를 통해 rustup을 먼저 설치 한다. curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh 이미 설치되어 있는 경우에는 rust update 명령어를 통해 최신 버전으로 업데이트 한다. λ rustup -V rustup 1.21.1 (7832b2ebe 2019-12-20) λ rustup update stable info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu' info: latest update on 2020-06-18, rust version 1.44.1 (c7087fe00 2020-06-17) info: downloading component 'rustc' 60.3 MiB / 60.3 MiB (100 %) 10.7 MiB/s in 5s ETA: 0s info: downloading component 'rust-std' 17.

Continue reading

pgrep

linux 의 pgrep 명령어는 확장 정규 표현식 패턴으로 모든 프로세스의 이름을 검색할 수 있으며 기본적으로 프로세스 ID를 반환한다. 기본 사용법은 다음과 같다. λ pgrep zsh 1353 1541 Usage: pgrep [options] <pattern> Options: -d, --delimiter <string> specify output delimiter -l, --list-name list PID and process name -a, --list-full list PID and full command line -v, --inverse negates the matching -w, --lightweight list all TID -c, --count count of matching processes -f, --full use full process name to match -g, --pgroup <PGID,.

Continue reading

Author's picture

GeekSaga

.

Dreamer

Korea