farmeter / random

0 stars 0 forks source link

Big file 특정 라인 찾기 #36

Open farmeter opened 4 years ago

farmeter commented 4 years ago

파일이 너무 커요ㅠ

매우 큰 파일의 특정 부분만 보고 싶을 때

cat -n file.log | grep 'keyword'
1079791013 줄이 나왔네

cat ALL_best_price.xml | head -n 끝라인 | tail -끝에서 보고싶은 건
cat ALL_best_price.xml | head -n 1079799999 | tail -20000
보고 싶은게 1400~1600줄이다
cat ALL_best_price.xml | head -n 1600 | tail -200