C.W.K.
Stream
Lesson 08 of 10 · published

도움 받기 — --help / tldr / cheat.sh

~15 min · help, tldr, cheat, documentation

Level 0창 구경꾼
0 XP0/95 lessons0/14 achievements
0/100 XP to next level100 XP to go0% complete

'어떻게 써?' 의 세 layer

Man page 는 빠짐없어. 가끔은 그게 필요 없어 — 그냥 예시 한 줄이 필요해. tldrcheat.sh 가 그 자리야. 가장 흔한 쓰임을 copy-paste 가능한 형태로 줘.

--help — 제일 빠른 답

거의 모든 모던 command 가 --help 지원 (어떤 건 -h 만, 옛날 거는 -?). man page 보다 짧고 보통 한 줄 요약 + synopsis + 가장 많이 쓰는 옵션이 나와. 길면 less 로 받아 — git --help | less.

tldr — 커뮤니티 예시

tldr 는 command 의 5~8 개 예시 invocation 을 보여줘. tldr tar 하면 압축 해제, 압축, 내용 보기, 권한 보존 — 다 실제 one-liner. 옵션 설명 추상적인 거 말고. 설치는 brew install tlrc 또는 npm install -g tldr.

cheat.sh — 검색 가능한 cheat sheet

더 강력. curl 친화적인 지식 베이스. curl cheat.sh/findfind cheat sheet 출력. curl cheat.sh/python/list+comprehension 같은 프로그래밍 질문도 답해. 설치 안 해도 되고, cheat 로 alias 만들면 편해.

info — GNU 의 verbose 대체

GNU 가 선호하는 문서 형식. info bash 가 터미널 안 hypertext 브라우저를 띄워. 대부분 개발자가 안 써 (man + --help 로 충분해서) 지만 grep, sed 같은 건 GNU info page 가 예시 더 풍부해.

실전 우선순위

  1. tldr — '동작하는 예시 줘'
  2. command --help | less — '어떤 flag 가 있어?'
  3. man command — '진짜 정답 필요해'
  4. cheat.sh — '이상한 질문, 누군가 적어 놨길 바람'

Code

tldr 설치하고 써보기·bash
brew install tlrc          # Rust client, fast
tldr tar
tldr ssh
tldr --update              # refresh local pages
cheat.sh — 설치 없이 바로·bash
curl cheat.sh/find
curl cheat.sh/rsync
curl 'cheat.sh/python/sort+dict+by+value'
# Make it your own command
echo 'cheat() { curl -s "cheat.sh/$1"; }' >> ~/.zshrc

External links

Exercise

tldr 설치 (brew install tlrc). tldr ssh, tldr rsync, tldr docker 실행. 가장 자주 쓰는 command 의 tldr 보고 처음 본 flag 하나 메모. 이어서 curl cheat.sh/find 결과 훑어보기.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.