본문 바로가기

리눅스 관련/명령어7

프로세스 이름으로 죽이기 // killall -s KILL {name} ps 해서 kill -9 {PID} 랑 killall -s KILL {CMD} ex) kill -9 16532 killall -s KILL python 2022. 8. 3.
ps 와 ps -ef https://manpages.ubuntu.com/manpages/trusty/en/man1/ps.1posix.html Ubuntu Manpage: ps - report process status Powered by the Ubuntu Manpage Repository, file bugs in Launchpad © 2019 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd. manpages.ubuntu.com option 설명 The ps utility shall conform to the Base Definitions volume of IEEE Std 1003.1-2001, Section 12.2, Utility.. 2022. 5. 23.
tail 로그 확인할 때 자주쓰는 명령어 로그 확인할 때 자주쓰는 명령어 tail -99f ./tasklog.log tasklog.log 파일에 밑에서 99번째 까지 실시간으로 바뀌는걸 계속 볼 수 있다. 누군가가 tasklog.log 파일을 수정하면 수정하는대로 바로 뜸 vi 나 cat으로 볼 수 도있지만, 둘다 실시간이 아니고 vi를 하면 tasklog.log파일을 잡고있어서 다른 쪽에서 수정이 불가능하다. 2022. 5. 13.
grep , find , sed(문자열 치환) find 파일찾기 ( 권한문제 때문에 sudo 를 써야하는 경우가 더러 있다. find / ~~~ 이런경우 ) grep 파일내부 문자열 찾기 sed 문자열 치환 예시 grep -r 'py_srccli' . 현재 폴더부터 내부 문자열 중에 'py_srccli' 이 포함된 파일 전부 찾아라 grep -r 'py_srccli' ./src src 폴더부터 내부 문자열 중에 'py_srccli' 이 포함된 파일 전부 찾아라 + ls | grep *.sh 끝에가 .sh 로 끝나는 거만 'ls' 명령어로 출력 find . -name "client_member_f*" 현재 폴더부터 파일 이름이 "client_member_f~~~~~~" 인 파일을 전부 찾아라 sed 하위 경로 파일에 있는 문자열 전부 치환 find ... 2022. 4. 27.
우분투 버전확인 lsb_release -a 우분투 버전이랑 codename 나옴. 둘다 자주 쓰는 거.. echo 에서 (lsb_release -a) 이런식으로 활용해서 씀. 2022. 4. 20.
export, source, 계정관리 명령어 source 지역변수 올리기 ( 한 터미널에서 ) export 명령어를 통해서 쉘 변수를 환경변수로 저장 할 수 있다. ( 터미널 전부 ) (newgrp, newusers, passwd, pwck) && groupadd, groupdel https://chanchan-father.tistory.com/210 [RHEL6] 계정관리 명령어들 7탄(newgrp, newusers, passwd, pwck) 19. newgrp(새 그룹) 1) 경로 : /usr/bin/newgrp 2) 요약 : 새로운 그룹으로 로그인 3) 사용 방법 : newgrp [그룹명] 4) 추가 설명 newgrp 명령어는 현재 세션의 사용자 그룹을 변경합니다. touch 명령.. chanchan-father.tistory.com newg.. 2022. 4. 19.