전체 글 229

검색

locate 화일명하루에 한번씩 업데이트되는 db를 이용하기 때문에 새로 생긴 화일은 검색이 안됨. findfind디렉토리옵션 옵션 명령   -name       -size+10M   10메가 이상  -size-1M   1메가 미만  -size+500M-size-5G-exec du -sh {} \;500메가~5기가 사이로 사이즈 표시  -user(-group)pak  -lspak유저의 화일 리스트  -perm755  -ls권한이 755인 화일 또는 디렉토리 리스트  -perm-222-typef (d)-ls권한이 222인 화일(디렉토리)만 리스트 /etc-mmin-60   과거 60분이내에 변경된 config 화일 /bin /usr/bin /sbin /usr/sbin-ctime-3   (해킹의심시) 3일이..

Commands/Linux 2025.03.01

소프트웨어 패키지 관리

Ubuntu(Debian 계열)에 있어서 apt 는  dpkg 패키지 시스템을 위한 프론트엔드 명령어이다.apt-cache 는 패키지 데이터베이스에서 정보를 검색하기 위한 명령어이다. 로컬 패키지 데이터베이스를 최신 상태로 업데이트$ sudo apt update 현 설치된 패키지들을 일괄적으로 업그레이드$ sudo apt upgrade 패키지 인스톨$ sudo apt install 패키지명# 인스톨되는 과정에 어떠한 일이 일어날지 알고 싶다면 (시뮬레이션)$ sudo apt install -s 패키지명 패키지 제거 # configuration 화일들은 제거되지 않고 남음$ sudo apt remove 패키지# 모든 화일들을 제거$ sudo apt purge 패키지명# 다른 패키지에 딸려 인스톨되서 더이상..

Commands/Linux 2025.03.01

Listening (Colbert Late Show)

what's why why would you why would you do this why is this the thing that you are doing for our Amusement putting yourself endangered so we get our our jollies(=have fun) out of it where did this come from, have you always been like an adrenaline junkie?왜, 왜 그렇게 하는 거야? 왜 이런 일을 하는 거야? 우리를 즐겁게 하려고 네 자신을 위험에 빠뜨리는 거야? 우리가 그걸 보고 즐거워하라고? 이게 대체 어디서 나온 거야? 원래부터 아드레날린 중독자(스릴을 즐기는 사람)였어?  probably a littl..

youtube english 2025.03.01

aws 처럼 ssh 로 password 없이 private key 로 접속하기

ssh 가 인스톨되어 있는지 확인후 없다면 인스톨$ sudo systemctl | grep ssh# 아무것도 안나오면$ sudo apt update$ sudo apt install ssh ssh로 접속시 패스워드를 사용하지 않는 설정$ sudo nano /etc/ssh/sshd_config아래를 찾아서. . . # PasswordAuthentication yes . . .아래로 변경. . . PasswordAuthentication no. . .Ctrl + x 로 save 하여 빠져나옴# 서비스 restart$ sudo systemctl restart ssh 방화벽에서 ssh 를 허용$ sudo ufw allow ssh 키 생성$ ssh-keygen Generating public/private rsa ..

Commands/Linux 2025.03.01

방화벽 (firewall)

Ubuntu 에서의 firewall 은 기본적으로 UFW (Uncomplicated FireWall) 서비스를 사용한다.※ CentOS  에서는 firewalld 를 사용 IP 설정시의 주의allow 는 whitelist 를 설정하는 의미로 해당 IP만 접근을 허락하고 나머지는 거부deny 는 blacklist 를 설정하는 의미로 해당 IP만 접근을 거부 먼저 ufw 의 상태를 체크$ sudo systemclt status ufw 만약 서비스가 존재하지 않는다면 인스톨을 하자$ sudo apt install ufw enable / disable$ sudo  ufw enable$ sudo  ufw disable 웹서비스(http / https) 포트 허용$  sudo ufw allow 80 $  sudo ..

Commands/Linux 2025.02.28

유저 / 그룹 / 화일 관리

유저 추가$ sudo adduser user2/home/user2 폴더생성config 화일들의 /home/user2 에 복사패스워드 입력 요구 현 유저에서 화일 생성$ touch newfile$ ls -al newfile  -rw-r--r--      1  user1      user1             0 Sep 20 19:25  newfilerw- : 소유자는 읽기 쓰기만 가능r--  :  소유자가 속한 그룹의 멤버들은 읽기만 가능r--  :  타인들은 읽기만 가능 퍼미션 변경$ chmod 760 newfile$ ls -al newfile  -rwxrw----      1  user1      user1             0 Sep 20 19:25  newfile760 의 의미는 아래 참조혹은..

Commands/Linux 2025.02.28

5. 고급 git commands

※ 이력은 $ git log 를 통해 확인 가능 1. 직전 commit 를 수정 myfile.txt 를 수정$ git add myfile.txt $ git commit --amend   => "second commit" 가 표시되고 수정가능 => "second & edit commit" 2. revert | reset이전의 commit 을 취소하는 기능은 같으나 로그가 남는(revert)것과 남지 않는(reset)것이 다른 점이다.팀으로서 개발시에는 다른 팀원들이 이력을 알 수 있도록 하는 면에서 revert 를 추천한다. $ git revert HEAD=> 자유롭게 메세지 수정 가능   $ git reset --hard HEAD~~  3. cherry-pickmaster(second commit)에서 ..

4. merge conflict 해결

merge conflict 의 시나리오1. 동일 화일을 변경해서 merge 하는 경우        master 에서 issue2 와 issue3 로 분기해서 작업                  먼저 issue2를 merge하고나서 issue3를 merge하는 경우$ git checkout master Switched to branch 'master' $ git merge issue2 Updating b2b23c4..8f7aa27 Fast-forward  myfile.txt |    2 ++  1 files changed, 2 insertions(+), 0 deletions(-)$ git merge issue3    Auto-merging myfile.txt    CONFLICT (content): Mer..

Barcode 읽기

일과 관련해서 이미지 중의 Barcode를 자동으로 찾아내서 디코딩하는 라이브러리를 조사해 보았다. *Windows VC++환경(어디까지나 가지고 있는 특정 이미지를 사용)라이브러리결과참고OpenCV (cv::barcode::BarcodeDetector)위치 특정 불가VER 4.80 이상 필요zbar 같은 바코드영역들을  하나로 묶어서 결과 출력 x64 버젼이 필요ZXing같은 바코드영역들이 수평으로 존재하지 않는 한 각각 다른 결과로 출력다운로드  결국 ZXing 을 선택하게 되었다. #include #include "opencv2/opencv.hpp"#include "ReadBarcode.h"#include "BarcodeFormat.h"int main(int argc, char** argv){  ..

opencv 2025.02.23

Listening (The tonight show)

How old are the kids? 아이들은 몇 살인가요?They're 5, and they're 3, and I'm 49. And that's a 46-year gap. 아이들은 5살이고, 3살이에요. 그리고 저는 49살이죠. 그러니까 46년 차이가 나네요.And for the older parents out there, you start doing math if you're older. 나이가 있는 부모님들은 이런 계산을 하게 되죠.You know, I could very well be in a wheelchair at my daughter's wedding. Right? "내 딸 결혼식 때 나는 휠체어를 타고 있을 수도 있겠네." 그렇죠?They'll just wheel me in. There'..

youtube english 2025.02.23