๊ธ€ ์ž‘์„ฑ์ž: ๋˜ฅํด๋ฒ .
๋ฐ˜์‘ํ˜•

Shell ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•˜์—ฌ ์ถœ๋ ฅ๋œ ๊ฐ’์—์„œ ์›ํ•˜๋Š” ๋ผ์ธ๋งŒ ๋ณด๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ๊ฐ€ ์žˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด,

 

$ ll

ํ•ฉ๊ณ„ 588
drwxr-xr-x  2 root root     61 11์›” 29 10:43 bin
drwxr-xr-x  6 root root     84 11์›” 13 16:01 cmd
drwxr-xr-x  5 root root     64 11์›” 13 16:01 configs
-rw-r--r--  1 root root 403720 11์›” 29 16:08 front_debug.log
-rw-r--r--  1 root root    521 11์›” 13 16:01 go.mod
-rw-r--r--  1 root root   4336 11์›” 13 16:01 go.sum
drwxr-xr-x 10 root root    132 11์›” 13 16:01 pkg
drwxr-xr-x  6 root root     85 11์›” 28 15:26 test
drwxr-xr-x  2 root root     19 11์›” 13 16:01 third_party
drwxr-xr-x  3 root root     34 11์›” 13 16:01 tools
drwxr-xr-x  7 root root    120 11์›” 28 15:26 vendor

์—ฌ๊ธฐ์„œ 5๋ฒˆ์งธ ๋ผ์ธ์ธ

-rw-r--r--  1 root root 403720 11์›” 29 16:08 front_debug.log

๋งŒ ์ถœ๋ ฅํ•˜๊ณ  ์‹ถ์œผ๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ฒ˜๋ฆฌํ•˜๋ฉด ๋œ๋‹ค.

 

ll | head -4 | tail -1

 

 

์ •๋ฆฌ


# N: ๋ช‡๋ฒˆ์งธ ๋ผ์ธ
$ ์ถœ๋ ฅ ๋ช…๋ น์–ด | head -N | tail -1
๋ฐ˜์‘ํ˜•