Saving output to files
이 페이지는 최신 브라우저(SharedArrayBuffer 지원)가 필요합니다. Chrome, Edge, Firefox 또는 Safari를 최신 버전으로 업데이트해 주세요.
English
Catching the output
- Normally a command's output appears on screen. The
>symbol redirects it into a file instead:
echo hello > greeting.txt
- Nothing prints — the text went into
greeting.txt. Read it back withcat greeting.txt.

English
Replace vs add
>replaces the file's contents (or creates it if new).>>appends — it adds to the end, keeping what was there:
echo line one > notes.txt
echo line two >> notes.txt
- Use
>>when you are building up a file, like a log.
English
Why this matters
- Saving output lets you keep results, build files from commands, and feed one program's output to another.
- ⚠️ Watch out:
>on an existing file erases it first. Use>>when you mean "add".
English
Common mistakes
>overwrites a file;>>adds to the end.>on a file that already exists erases it first.
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
Send the output of echo into a file with >. Write hello 안으로 greeting.txt, then cat it back.
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
>> adds a line instead of replacing. Write first 안으로 log.txt, then append second, then show the file.
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
Save the names in names.txt in alphabetical order into a new file sorted.txt, then show sorted.txt.