목록분류 전체보기 (1395)
변군이글루(Mirror)

find rm 명령어 Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression] 생성된 지 30일 이상 된 파일만 삭제 find /var/spool/clientmqueue -ctime +30 -exec rm -f {} \; find /var/spool/clientmqueue -ctime +30 | xargs rm -r https://explainshell.com/ explainshell.com - match command-line arguments to their help text explainshell.com

SSL 인증서의 만료일을 확인하는 방법 OpenSSL을 사용하는 방법 echo | openssl s_client -servername NAME -connect HOST:PORT 2>/dev/null | openssl x509 -noout -dates 주어진 명령어는 OpenSSL을 사용하여 특정 호스트와 포트로 연결된 서버의 인증서의 유효 기간을 확인하는 명령입니다. NAME은 서버의 이름이고 HOST와 PORT는 서버의 호스트와 포트 번호입니다. Option Description -connect HOST:PORT 연결할 호스트 및 포트 -servername NAME 서버 이름 표시(TLS SNI) 확장 실제 값으로 대체하여 사용할 때에는 [NAME], [HOST], [PORT]를 실제 값으로 변경해주어..

OpenSSL을 사용하여 개인키와 공개키를 생성하는 방법 1. 개인키(Private Key) 생성 openssl genrsa -out private.key 1024 $ openssl genrsa -out private.key 1024 Generating RSA private key, 1024 bit long modulus ......++++++ ................++++++ e is 65537 (0x10001) RSA 알고리즘을 사용하여 private.key 파일에 개인키가 생성됩니다. 2. 공개키(Public Key) 생성 openssl rsa -in private.key -out public.key -pubout $ openssl rsa -in private.key -out public.k..

시스템 시간 확인과 시간 동기화하는 방법 rdate 패키지 설치 yum install -y rdate $ yum install -y rdate ============================================ Package Arch ============================================ Installing: rdate x86_64 시스템 시간 확인 date $ date Thu Jul 22 16:10:13 KST 2021 타임 서버(time.bora.net) 시간 확인 rdate -p time.bora.net $ rdate -p time.bora.net rdate: [time.bora.net]Thu Jul 22 16:11:00 2021 타임 서버와 시스템(로컬 서버)..

kill 명령어 kill 명령어는 특정 프로세스를 종료시키는 명령어입니다. kill 명령어를 사용하면 프로세스의 ID(PID)를 지정하여 프로세스를 종료시킬 수 있습니다. kill 명령어 사용법 kill [옵션] PID kill 명령어의 옵션 -s: 시그널을 지정합니다. 기본 시그널은 TERM(15)입니다. -l: 사용 가능한 시그널을 나열합니다. -KILL: 강제 종료 시그널을 보냅니다. -INT: 인터럽트 시그널을 보냅니다. -QUIT: 종료 시그널을 보냅니다. httpd 프로세스 확인 ps -ef | grep httpd $ ps -ef | grep httpd root 5620 1 0 10:39 ? 00:00:00 /app/apache/bin/httpd -k start daemon 5621 5620 ..

Nginx의 액세스 로그에서 공격자 IP(attacker ip) 주소를 추출하는 방법 tail -n 10000 access.log | awk '{print $1}' | sort | uniq -c | sort -nr | head -n 10 $ tail -n 10000 /var/log/nginx/access.log | awk '{print $1}' | sort | uniq -c | sort -nr | head -n 10 554 111.111.111.111 210 222.222.222.222 57 222.222.222.223 56 222.222.222.224 50 222.222.222.225 48 222.222.222.226 48 222.222.222.227 45 222.222.222.228 44 222.22..

mac(macOS)에 Double Commander 설치 및 설정하기 Double Commander는 두 개의 패널이 나란히 있는 무료 크로스 플랫폼 오픈 소스 파일 관리자입니다. Total Commander에서 영감을 받아 몇 가지 새로운 아이디어를 제공합니다. Double Commander : https://doublecmd.sourceforge.io/ Homebrew Formulae : https://formulae.brew.sh/cask/double-commander Double Commander 다운로드 페이지 - https://sourceforge.net/p/doublecmd/wiki/Download/ Double Commander 설치 brew install --cask double-comm..

.bashrc 파일을 생성하는 방법 /etc/skel 디렉토리에서는 사용자를 처음 생성했을 때 해당 계정의 홈 디렉토리에 기본으로 들어가는 파일을 지정한다. 즉 사용자 생성 시 /etc/skel 안에 있는 파일이 계정 홈 디렉토리로 복사된다. useradd 명령어로 새로운 사용자를 생성될 때 SKEL 디렉토리에 있는 파일이 자동으로 사용자 홈 디렉토리에 복사 cat /etc/default/useradd $ cat /etc/default/useradd # useradd defaults file GROUP=100 HOME=/home INACTIVE=-1 EXPIRE= SHELL=/bin/bash SKEL=/etc/skel CREATE_MAIL_SPOOL=yes SKEL 디렉토리의 파일 목록 .bash_log..