본문 바로가기

Infra Architecture/linux

[ Linux ] 윈도우와 리눅스의 줄바꿈 차이

반응형

리눅스에서는 줄바꿈을 LF(Line Feed) 로만 하지만 윈도우에서 만들어진 문서의 줄바꿈은 CR(carriage return) + LF(Line Feed)로 한다.

LF는 16진수로 0A , CR은 16진수로 0D 이다.

 

test@ykd2:~$ cat hello_echo.txt
hello
test@ykd2:~$ cat hello_ms.txt
hello
test@ykd2:~$ hexdump -C hello_echo.txt
00000000  68 65 6c 6c 6f 0a                                 |hello.|
00000006
test@ykd2:~$ hexdump -C hello_ms.txt
00000000  68 65 6c 6c 6f 0d 0a                              |hello..|
00000007
반응형