![테이블 데이터를 읽기 위한 명령줄 유틸리티](https://linux55.com/image/40430/%ED%85%8C%EC%9D%B4%EB%B8%94%20%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%A5%BC%20%EC%9D%BD%EA%B8%B0%20%EC%9C%84%ED%95%9C%20%EB%AA%85%EB%A0%B9%EC%A4%84%20%EC%9C%A0%ED%8B%B8%EB%A6%AC%ED%8B%B0.png)
저는 대규모 데이터 세트의 구조를 빠르게 연구할 수 있는 명령줄 유틸리티를 찾고 있습니다. 이제 다음을 사용하고 있습니다. head -n 2 dataset
하지만 문제는 출력 너비가 터미널/화면 너비보다 크다는 것입니다.
Ctrl+f
Vim에서 열린 /scroll 파일 로 할 수 있는 것처럼 파일을 수평으로(고정된 열 수만큼) 스크롤하는 도구가 있다면 완벽할 것입니다 Ctrl+b
.
답변1
나는 추천하고 싶다less
어떤 방향으로든 탐색할 수 있습니다.
less -S logfile
-에스또는--긴 줄을 자르세요
Causes lines longer than the screen width to be chopped rather than folded. That is, the portion of a long line that does not fit in the screen width is not shown. The default is to fold long lines; that is, display the remainder on the next line.
수평 이동을 위한
ESC-)또는오른쪽 화살표
Scroll horizontally right N characters, default half the screen width (see the -# option). If a number N is specified, it becomes the default for future RIGHTARROW and LEFTARROW commands. While the text is scrolled, it acts as though the -S option (chop lines) were in effect.
ESC-(또는왼쪽 화살표
Scroll horizontally left N characters, default half the screen width (see the -# option). If a number N is specified, it becomes the default for future RIGHTARROW and LEFTARROW commands.