본문 바로가기

CentOS/Study

(196)
[Ubuntu]리눅스 최적화 설정 가이드 1. Update Image $ sudo apt-get update 2. 자동 업데이트 및 알림 비활성화(Disable Auto Update & Notify) $ sudo apt-get remove update-notifier Software & Updates Update 설정 - Automatically check for updates : never - When there are security updates : display immediately - Notify me of a new Ubuntu version: never 3. IPv6 비활성화(Disable IPv6) - sysctl.conf 수정 $ sudo vi /etc/sysctl.conf net..
장비 기본 점검 방법 / 명령어 / 확인 사항 / 비고 점검 항목 사용명령어 확인 사항 비 고 프로세스 상태 # ps -ef | grep 프로세스 Process 동작 확인 서비스 동작 여부 확인 디스크 사용량 # df -kh 디스크 사용량 확인 / 디렉토리 use% 확인 CPU 상태 # top CPU 사용량 확인 샤용량(%) 확인 MEMORY 상태 # free -mh MEMORY 사용량 확인 명령어 실행 후 -/+ buffers/cache 행의 used, free 항목 확인 NetWork 카드 # ifconfig -a IP 정보 확인 Inteface별 tx,rx packet 상태 확인 Routing 정보 # route ROUTE 정보 확인 System log 확인 # vi /var/log/messages log 확인 시스..
Section14>찾기 퀴즈 답안 Q1> # find . -name "*closed*" | wc -l Q2> # find . -name "*CLOSED*" Q3> # find . -iname "*closed*" | wc -l Q4> # find . -iname "*[13579]_open*" | wc -l Q5> # find . -empty Q6> # find . -size +20k Q7> # find . -size +150k -iname "*closed*" Q8> # find . -newer "yesterday.txt" -iname "*open*"
Section13>확장 퀴즈 답안 Q1> # touch morning-day-{1..30} Q2> # touch afternoon-day-{1..30} Q3> # touch todos-${date '+%y-%m-%d').txt Q4> # ls *9 Q5> # ls *1? Q6> # ls afternoon*7 Q7> # mkdir Mornings # mv morning* Mornings/ Q8> # mkdir -p Year/{Winter,Spring,Summer,Fall}/{Yard,House} Q9> # mkdir -p Year/{Winter,Spring,Summer,Fall}/{Yard,House}/{todos.txt,done.txt}
Section12>파이프 퀴즈 답안 Q1> # find . -type f | wc -l Q2> # ls PokeDex/ | tr A-Z a-z | sort -n > all-pokemon.txt Q3> # cat all-pokemon.txt | head -18 | tail -3 Q4> # cat all-pokemon.txt | head -151 Q5> # cat all-pokemon.txt | head -151 | tr -d 0-9 Q6> # cat all-pokemon.txt | head -151 | tr -d 0-9 | sort Q7> # cat all-pokemon.txt | head -151 | tr -d 0-9 | sort > original-151.txt
Section11>리다이렉션 퀴즈 답안 Q1> # cat angle-surver.txt juan-surey.txt nico-survey.txt > all-species.txt Q2> # sort -u all-species.txt > sorted-animails.txt Q3> # date >> sorted-animals.txt Q4> # echo Green Anaconda >> sorted-animals.txt Q5> # uhhh 2>> sorted-animals.txt
Section10>파일로 작업하기 퀴즈 답안 2 Q1> # tac purchases.txt Q2> # sort purchases.txt Q3> # wc -l purchases.txt Q4> 특정 필드 기준 정렬 : # sort -k3 purchases.txt 숫자 값(문자열)에 따라 정렬 # sort -n purchases.txt 역순 정렬 # sort -r purchases.txt # sort -nrk3 purchases.txt
Section10>파일로 작업하기 퀴즈 답안 1 Q1> # cat poem.txt Q2> # cat -n poem.txt Q3> # cat poem.txt | less 한 줄씩 위 아래 : 화살표 위 / 아래 한 페이지씩 위 아래 : 스페이스바 Q4> # cat poem.txt | less 행 번호 : -N /Dog 대소문자 없이 : -i Q5> # cat poem.txt | less - 50p Q6> # wc -w poem.txt Q7> # head -n 4 poem.txt Q8> # tail -n 8 poem.txt