본문 바로가기

IT, PC/Linux14

terminal(console) 에서 파일 비교(diff) 2개의 파일을 비교하는 경우가 가끔 있는데, 간단히 터미널에서 확인하는 방법 diff 사용 # diff a.txt b.txt $ diff base.docker-compose.yml docker-compose.yml 4,7c4,7 container_name: > image: test_image > stdin_open: true # == docker run -i > tty: true # == docker run -t 9c9 - .:/app # local의 .현재폴더와 container의 /app 폴더 mount vim 사용 # vimdiff a.txt b.txt $ vimdiff .. 2023. 4. 10.
vim 옵션 설정 파일 .vimrc .vimrc 파일 첨부 필요한 옵션만 사용하고 사용하고 싶지 않은 옵션 앞에 "(큰따온표) 붙이면 된다. 아래는 텍스트 파일 내용이다. """"""""""""""""""""""""""""" "색깔 관련 부분 """"""""""""""""""""""""""""" syntax on color ron " 색깔 밝게 filetype on filetype indent on filetype plugin on """""""""""""""""""""""""""""""" "기본 설정 """""""""""""""""""""""""""""""" set sm " 추가된 괄호짝 보여주는 기능 set ruler " 커서가 항상보임 set history=1000 " 명령어히스토리 set cmdheight=1 " 하단의 명령줄을 위.. 2023. 4. 3.
zsh 설치/셋팅하기 - install, setting zsh이 좋은점 : tab 자동완성, 제안(Ctrl + r), 프롬프트 install zsh, oh-my-zsh, zsh-syntax-highlighting $ sudo apt install zsh && \ chsh -s `which zsh` && \ sudo apt install zsh-syntax-highlighting && \ echo "source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc && \ curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh config zsh edit theme and add plug.. 2023. 3. 13.
정규식 regex - 파일이름 일괄 바꾸기 정규표현식 - 콘솔에서 파일이름 바꾸기 From: model-114260.data-00000-of-00001 model-114260.index model-114260.meta To: model.data-00000-of-00001 model.index model.meta $ ls |grep model | sed "s/model-\w*\.\(\S*\b\)/mv '&' 'model.\1'/" |sh \1 == (\S*\b) From 파일의 .뒷부분 $ mv 'model-114260.data-00000-of-00001' 'model.data-00000-of-00001' $ mv 'model-114260.index' 'model.index' $ mv 'model-114260.meta' 'model.meta' Sy.. 2020. 6. 21.
파일이름이나 프로세스 명으로 프로세스 죽이기(kill) 프로세스 명으로 프로세스 죽이기 nohup으로 프로세스 돌렸을 때 아래 명령어에서 manage.py를 죽이는 것 manage.py 만 원하는 이름으로 바꾸고 사용하면 된다 $ kill -9 `ps aux |grep manage.py |grep -v grep |awk '{ print $2 }'` 2020. 6. 13.
우분투(ubuntu) 18.04 에서 도커(docker) 설치 방법 docker 설치 준비 $ sudo apt update $ sudo apt install apt-transport-https ca-certificates curl software-properties-common $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" $ sudo apt update $ apt-cache policy docker-ce 마지막 줄의 명령어를 입력하고 실행하게 되면 다음과 같은 메시지가 표시된다 docker-ce: I.. 2020. 6. 4.
리눅스 상의 해상도 변경 방법 (콘솔/터미널, X윈도) 콘솔창의 해상도 변경 방법 1. menu.lst 수정 가능 경우 grub설정예 #vi /boot/grub/menu.lst ------------------------------------------------------------------ default 0 timeout 25 splashimage=(hd0,1)/boot/grub/splash.xpm.gz title=Windows XP PRO root (hd0,0) chainloader +1 title=My Gentoo Linux root (hd0,1) kernel /boot/bzImage root=/dev/hda2 vga=0x317vi /etc/X11/xorg.conf 2012. 1. 12.
[Linux]삼바설정가이드 삼바(samba)설정 가이드 (2.X & 3.X) Linux http://blog.naver.com/lovinghc/30015211906 ★★삼바(samba)설정 가이드 (2.X & 3.X) ================================================= updated by lim geun sik lon 2006.09.30 ■ 1. 삼바 서버 유저 생성방법 ■ 2. 삼바 서버의 네트웍 속도 항샹 기법 ■ 3. 삼바 클라이언트 작동법 ■ 4. 삼바 마운트작동법(3.0.11이상버젼부터는 mount -t cifs이용) ■ 5. swat 을 이용하여 웹으로 설정하는 방법 ■ 6. MS의 프린터 이용하기 ■ 7. 삼바 실행파일 설명 ■ 8. 삼바(samba)서버 환경 화일 ( smb.co.. 2012. 1. 12.
Apache Server의 키 생성과 인증 yessign에서 SSL 인증서를 발급 받기 위해서는 CSR 파일이 필요하다.CSR 파일 생성 방법 / Apache Server의 키 생성과 인증 Apache + mod_ssl을 설치하면 기본적으로 30일간 사용할수 있는 Certificate가 /path/to/apache/conf/ssl.crt 디렉토리에 설치되어 있다. 이것을 자신의 CA에서 인증한다면 여러분이 원하는 기간동안 사용할수 있는 Certificate가 생성된다. 그러나 공인인증기관에서 인증서를 받기를 원한다면, 아래와 같이 CSR을 생성하여 인증서를 신청해야 한다. 당신이 서비스 하는 도메인을 www.virtualhost.com이라고 하고 다음과 같이 한다. openssl명령어를 이용하여 Web Server의 RSA키를 생성한다. $ op.. 2011. 4. 13.