gzip 사용법

linux 2014. 3. 27. 09:44

gzip 사용법


>압축하기

#gzip 파일명


>압축풀기

#gzip 파일명.gz


>압축하고 원본파일 덮어쓰기

#gzip -f 파일명


>도움말보기

#gzip -h


도움말

usage: gzip [-cdfhlLnNrtvV19] [-S suffix] [file ...]

 -c --stdout      write on standard output, keep original files unchanged

 -d --decompress  decompress

 -f --force       force overwrite of output file and compress links

 -h --help        give this help

 -l --list        list compressed file contents

 -L --license     display software license

 -n --no-name     do not save or restore the original name and time stamp

 -N --name        save or restore the original name and time stamp

 -q --quiet       suppress all warnings

 -r --recursive   operate recursively on directories

 -S .suf  --suffix .suf     use suffix .suf on compressed files

 -t --test        test compressed file integrity

 -v --verbose     verbose mode

 -V --version     display version number

 -1 --fast        compress faster

 -9 --best        compress better


'linux' 카테고리의 다른 글

traceroute 명령어  (0) 2014.12.10
ssh, sftp 명령어..  (0) 2014.06.11
hp unix, ibm unix 한글 언어 확인  (0) 2014.03.24
crontab 설정  (0) 2014.03.13
ftp shell 프로그래밍..  (0) 2014.02.11
Posted by 무세1
,

log를 찍을때 개발은 한글이 깨지고 운영은 한글이 잘 된다.. 


운영은 ibm unix 개발은 hp-unix


한글설정 확인을 해보는 방법..


개발서버를 보니 한글이 설정이 안되어 있다...

# locale

LANG=

LC_CTYPE="C"

LC_COLLATE="C"

LC_MONETARY="C"

LC_NUMERIC="C"

LC_TIME="C"

LC_MESSAGES="C"

LC_ALL=


지원한글 캐릭터셋 확인

# locale -a  | grep ko

ko_KR.eucKR

ko_KR.utf8


캐럭터 설정

# export LANG=ko_KR.eucKR

# locale

LANG=ko_KR.eucKR

LC_CTYPE="ko_KR.eucKR"

LC_COLLATE="ko_KR.eucKR"

LC_MONETARY="ko_KR.eucKR"

LC_NUMERIC="ko_KR.eucKR"

LC_TIME="ko_KR.eucKR"

LC_MESSAGES="ko_KR.eucKR"

LC_ALL=


이렇게 설정하니..  로그 찍을때 한글이 깨지지 않는다.. ㅎㅎ



'linux' 카테고리의 다른 글

ssh, sftp 명령어..  (0) 2014.06.11
gzip 사용법  (0) 2014.03.27
crontab 설정  (0) 2014.03.13
ftp shell 프로그래밍..  (0) 2014.02.11
유용한 Unix 명령어  (0) 2014.01.23
Posted by 무세1
,

날짜가 몇주인주 계산해야 하는 경우가 있다.


그때 다음과 같이 구할수 있따..


SELECT  TO_CHAR(TO_DATE('20131231'),'WW') FROM DUAL;

-> 53

SELECT  TO_CHAR(TO_DATE('20131231'),'IW') FROM DUAL;

-> 01

WW : 해당해의 1일부터 7일단위로 끊어서 주차를 생성

IW   : 날짜 해당한 주가 하루라도 다음해인 경우에는 그해의 첫주가 됨.


SELECT  TO_CHAR(TO_DATE('20140115'),'W') FROM DUAL;

-> 3

SELECT  TO_CHAR(TO_DATE('20140215'),'W') FROM DUAL;

-> 4

W : 해당월의 주차를 구함



Posted by 무세1
,