Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Generic
- mongoose
- Filter
- Interface
- Service
- union
- Kotlin
- animation
- elementAt
- Swift
- collection
- MINUS
- enum
- 생명주기
- lifecycle
- LiveData
- docker-compose
- class component
- ConstraintLayout
- docker
- CLASS
- recyclerview
- react native
- AWS
- vuex
- map
- list
- function
- Foreign Key
- ReactNative
Archives
- Today
- Total
개발 일기
cat , head , tail? 본문
Cat ?
텍스트의 파일의 경우 내용을 출력하고 또는 여러 개의 파일을 연결해서 볼수가 있습니다.
예시 :)
error.log라는 파일을 출력합니다.
cat error.log
번호 행을 붙혀서 출력합니다.
cat -b error.log
빈행의 번호를 붙혀서 출력합니다.
cat -n error.log
연속되는 2개이상의 빈 행을 한행으로 출력합니다.
cat -s error.log
Head ?
Head는 파일의 앞부분의 필요한 갯수를 지정해서 확인할수 있습니다.
예시 :)
// 20줄까지만 출력합니다. ( 기본은 10 줄 )
head -n 20 error.log
// 200 byte 까지만 출력합니다.
head -c 200 error.log
Tail ?
tail은 특정 파일이 계속 추가 되는 상황을 실시간으로 모니터링 할수 있습니다.
// 파일의 마지막 부분 10줄을 출력합니다.
tail error.log
// 파일의 마지막 부분 20줄을 출력합니다.
tail -n 20 error.log
//로그 파일을 실시간으로 모니터링 할수 있습니다. 종료는 (command-c)
tail -f /var/log/messages
'linux' 카테고리의 다른 글
comm , cmp (0) | 2020.04.20 |
---|---|
cp , mv (0) | 2020.04.18 |
touch ? (0) | 2020.04.15 |
shutdown (0) | 2020.04.13 |
cron tab 사용방법 ? (0) | 2020.04.12 |
Comments