실제 질문에 답하는 레시피
이 레슨은 작은 쿡북. 각 one-liner 가 지금까지 본 도구로 구체적 질문에 답함. 돌리고, 변형하고, 재사용할 패턴 저장하기.
디스크 누가 잡아먹어?
du -sh ~/.* */ 2>/dev/null | sort -h | tailhistory 의 최다 command
history | awk '{print $2}' | sort | uniq -c | sort -rn | head액세스 로그의 top 10 IP
awk '{print $1}' access.log | sort | uniq -c | sort -rn | headrepo 의 언어별 LOC
find . -type f -name '*.*' \
| grep -vE 'node_modules|\.git|__pycache__' \
| awk -F. '{print $NF}' \
| sort | uniq -c | sort -rn파일별 TODO 모음
grep -rn TODO --include='*.py' --include='*.ts' \
--exclude-dir={node_modules,.git} . | head파일의 중복 줄
sort file | uniq -dISO timestamp 을 로컬 시간으로
awk '{cmd="date -j -f %Y-%m-%dT%H:%M:%S " $1 " +%H:%M"; cmd | getline lt; close(cmd); print lt, $0}'캡처된 로그에서 ANSI 색 코드 제거
sed -E 's/\x1B\[[0-9;]*[mK]//g' colored.log최근 60 분에 바뀐 거
find ~ -type f -mmin -60 -not -path '*/.cache/*' 2>/dev/null북마크 export 에서 URL 만
grep -oE 'https?://[^"]+' bookmarks.html | sort -u | head