Linux

[Linux] ๋Œ€์šฉ๋Ÿ‰ ํŒŒ์ผ ๋ถ„ํ• ํ•˜๊ธฐ (split ์‚ฌ์šฉ)

ํƒฑ์ ค 2021. 2. 9. 15:16

๋Œ€์šฉ๋Ÿ‰ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์—์„œ ํŒŒ์ผ์„ ๋ฐ›๊ฑฐ๋‚˜, ๋Œ€์šฉ๋Ÿ‰ ํŒŒ์ผ์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ ํŒŒ์ผ์„ ๋ถ„ํ• ํ•˜๋Š” ๊ฒƒ์ด ์ข‹๋‹ค.

csvํŒŒ์ผ๋„ ๊ฐ€๋Šฅํ•˜๊ณ , ํŒŒ์ผ ํ™•์žฅ๋ช…์ด ์—†๋Š” ํŒŒ์ผ ๋“ฑ ๋ชจ๋“  ํŒŒ์ผ์— ๋Œ€ํ•ด ๊ฐ€๋Šฅํ•˜๋‹ค.

 

1. ํŒŒ์ผ ์‚ฌ์ด์ฆˆ๋กœ ๋ถ„ํ• 

# 100kb ๋‹จ์œ„๋กœ ๋ถ„ํ• 
split -b 100k [ํŒŒ์ผ๋ช…]

# 100mb ๋‹จ์œ„๋กœ ๋ถ„ํ• 
split -b 100m [ํŒŒ์ผ๋ช…]

2. ํŠน์ • ๋ผ์ธ ์ˆ˜๋กœ ๋ถ„ํ• 

# 10000์ค„ ๋‹จ์œ„๋กœ ๋ถ„ํ• 
split -l 10000 [ํŒŒ์ผ๋ช…]

# 1000000์ค„ ๋‹จ์œ„๋กœ ๋ถ„ํ• 
split -l 1000000 [ํŒŒ์ผ๋ช…]
728x90