본문 바로가기

파일3

test (파일 확인 명령어) 00 개요역시나 shell script에서 등장하기에 정리해 놓으려 한다..01 test 명령어란1. test 정의시험 ㅎㅎ2. test 명령어 기능 파일 타입을 확인하고 값들을 비교한다파일의 존재 유무 / 타입 / 권한을 확인할 때 사용한다조건문이 들어가야할 위치에 test가 광범위하게 사용된다EXPRESSION이 주어졌을 경우, EXPRESSION에 의해 결정된 상태(true or false)와 함께 종료EXPRESSION이 없을 경우 기본값은 false 상태로 exit3. test 명령어 문법# test EXPRESSION # test # [ EXPRESSION ]# 띄어쓰기 주의! # [ ] # [ OPTION[ 도 명령문이기 때문에 반드시 대괄호 [ ] 와 expression 사이에는 빈칸이 있.. 2024. 6. 5.
find (파일 검색 명령어) 01 find 명령어란1. find 정의'찾다'2. find 명령어 기능Linux 에서 파일 및 디렉토리를 검색할 때 사용옵션을 사용해 원하는 파일 및 디렉토리 검색 가능3. find 명령어 문법# find [path] [options] [expression]path (경로): Starting directory for the searchoptions (옵션): Additional settings or conditions for the searchexpression (표현식): Criteria for filtering and locating filesfind 명령에는 몇 가지 옵션(option)과 많은 수의 표현식(expression)이 존재 find 명령의 검색 결과가 지정된 expression의 조합에.. 2024. 4. 5.
tar (archive 파일 작업 명령어) 00 서론0. 용어 정리archive file: 하나 또는 여러개의 파일을 압축한 파일. 파일을 압축하여 저장 공간 절약하며 데이터의 휴대성을 높임01 tar이란1. tar의 정의$ tar [options] [archive-file] [file or dir to be archived]'Tape Archive'의 약자Linux 명령어archive 파일 관련 작업 기능 제공2. tar 옵션옵션설명-carchive file 생성 (create)-xarchive file 추출 ( extract)-farchive file의 이름을 지정 (specify filename)-v터미널에 tar operation의 verbose info 출력 (print verbose info) *verbose: 장황하게 말이 많은 연설.. 2024. 3. 28.