리눅스 설정 수집

리눅스 설정 수집

1 간단히[ | ]

cd /root/
TODAY=`date +%Y%m%d`
df -P -h > $HOSTNAME.$TODAY.ps.txt
ps -ef > $HOSTNAME.$TODAY.ps_-ef.txt
netstat -anp > $HOSTNAME.$TODAY.netstat_-anp.txt
grep bash /etc/passwd | cut -f1 -d: > $HOSTNAME.$TODAY.bash_users.txt
ll $HOSTNAME.$TODAY.*.txt
→ 파일시스템, 프로세스, 네트워크, 계정 목록 수집

2 자세히[ | ]

cd /root/
TODAY=`date +%Y%m%d`
df -P -h > $HOSTNAME.$TODAY.df.txt
ps -ef > $HOSTNAME.$TODAY.ps_all.txt
ps -ef | grep ]$ > $HOSTNAME.$TODAY.ps_system.txt
ps -ef | grep -v ]$ > $HOSTNAME.$TODAY.ps_user.txt
netstat -anp > $HOSTNAME.$TODAY.netstat.txt
netstat -anp | grep -w LISTEN > $HOSTNAME.$TODAY.netstat_listen.txt
grep bash /etc/passwd | cut -f1 -d: > $HOSTNAME.$TODAY.bash_users.txt
ll $HOSTNAME.$TODAY.*.txt
→ 시스템 프로세스(ps_system.txt)와 사용자 프로세스(ps_user.txt)로 구분하여 추가 수집
→ 포트 사용 프로세스 중 LISTEN인 것만 구분하여 추가 수집

3 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}