grep binary

linux 2018. 8. 31. 16:51

grep 명령어로 파일 검색시 아래와 같은 메세지가 발생.


> grep Exception a.log

Binary file a.log matches


a.log 파일이 Binary 파일이기 때문에 검색이 되지 않음.

-a 옵션을 넣어 주면 검색된다.


> grep -a Exception a.log



'linux' 카테고리의 다른 글

vi에 paste시 생기는 들여쓰기 자동현상 OFF  (0) 2018.01.15
Tomcat console log UTF-8 설정.  (0) 2016.05.27
apache에서 tomcat 설정.  (0) 2016.03.29
curl 이용하기  (0) 2015.09.03
리눅스 file 사이즈 0 으로 만들기  (0) 2015.07.31
Posted by 무세1
,

vi에  copy & paste할때 들여쓰기가 되어 계단형식으로 되는 경우가 있다.


이때 vi에서 아래 명령어를 이용해서 자동 들여쓰기를 끄면 된다.


#자동들여쓰기 끄기

:set paste


#다시 원복 하려면

:set nopaste

or

:set paste!



'linux' 카테고리의 다른 글

grep binary  (0) 2018.08.31
Tomcat console log UTF-8 설정.  (0) 2016.05.27
apache에서 tomcat 설정.  (0) 2016.03.29
curl 이용하기  (0) 2015.09.03
리눅스 file 사이즈 0 으로 만들기  (0) 2015.07.31
Posted by 무세1
,

tomcat console 로그에서 한글 깨짐 현상 발생.


톰켓 기동시 file encoding option 추가하니 해결.


set "JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF8"


'linux' 카테고리의 다른 글

grep binary  (0) 2018.08.31
vi에 paste시 생기는 들여쓰기 자동현상 OFF  (0) 2018.01.15
apache에서 tomcat 설정.  (0) 2016.03.29
curl 이용하기  (0) 2015.09.03
리눅스 file 사이즈 0 으로 만들기  (0) 2015.07.31
Posted by 무세1
,

apache에서 tomcat 설정.

linux 2016. 3. 29. 16:09

Apache에서 특정 url만 tomcat으로 넘기고 싶을때...  conf/extra/httpd-vhosts.conf를 열고 수정하면 된다.


<VirtualHost _default_:80>

ServerName _default_:80

DocumentRoot ...

....


JkMount /*.jsp Tomcat

JkMount /*.do Tomcat

</VirtualHost>



*.jsp, *.do URL을 톰캣으로 보내라는 설정이다.


특정 URL을 톰캣으로 보내고 싶지 않을때는, JkUnMount를 쓰면 된다.


'linux' 카테고리의 다른 글

vi에 paste시 생기는 들여쓰기 자동현상 OFF  (0) 2018.01.15
Tomcat console log UTF-8 설정.  (0) 2016.05.27
curl 이용하기  (0) 2015.09.03
리눅스 file 사이즈 0 으로 만들기  (0) 2015.07.31
리눅스 find cp 혼합  (0) 2015.07.29
Posted by 무세1
,

curl 이용하기

linux 2015. 9. 3. 18:49

POST 방식으로 json 날리기

curl http://localhost:8080/api/customers -v -X POST -H "Content-Type: application/json" -d "{\"firstName\":\"kildong\",\"lastName\":\"hong\"}"


curl http://localhost:8080/api/customers -v -X POST -H "Content-Type: application/x-www-form-urlencoded" -d "firstName=kildong&lastName=hong"



GET 방식으로 json 받아오기

curl http://;localhost:8080/api/customers -v -X GET


'linux' 카테고리의 다른 글

Tomcat console log UTF-8 설정.  (0) 2016.05.27
apache에서 tomcat 설정.  (0) 2016.03.29
리눅스 file 사이즈 0 으로 만들기  (0) 2015.07.31
리눅스 find cp 혼합  (0) 2015.07.29
traceroute 명령어  (0) 2014.12.10
Posted by 무세1
,

리눅스에서 파일 사이즈 0으로 만드는 명령어


파일이름이 filename.log인 경우 아래와 같이 쓰면 된다.

cat /dev/null > filename.log


'linux' 카테고리의 다른 글

apache에서 tomcat 설정.  (0) 2016.03.29
curl 이용하기  (0) 2015.09.03
리눅스 find cp 혼합  (0) 2015.07.29
traceroute 명령어  (0) 2014.12.10
ssh, sftp 명령어..  (0) 2014.06.11
Posted by 무세1
,

리눅스 find cp 혼합

linux 2015. 7. 29. 17:21

find해서 찾은 내용을 특정 디렉토리에 복사하고 싶을때...



find . -name "*.txt" -exec cp {} /home/muse/ \;


'linux' 카테고리의 다른 글

curl 이용하기  (0) 2015.09.03
리눅스 file 사이즈 0 으로 만들기  (0) 2015.07.31
traceroute 명령어  (0) 2014.12.10
ssh, sftp 명령어..  (0) 2014.06.11
gzip 사용법  (0) 2014.03.27
Posted by 무세1
,

traceroute 명령어

linux 2014. 12. 10. 10:23

traceroute -T -p 1700 10.1.1.23


포트까지 traceroute

'linux' 카테고리의 다른 글

리눅스 file 사이즈 0 으로 만들기  (0) 2015.07.31
리눅스 find cp 혼합  (0) 2015.07.29
ssh, sftp 명령어..  (0) 2014.06.11
gzip 사용법  (0) 2014.03.27
hp unix, ibm unix 한글 언어 확인  (0) 2014.03.24
Posted by 무세1
,

ssh, sftp 명령어..

linux 2014. 6. 11. 09:41

ssh,  sftp는 기본 설정 포트는 22이다..


사용포트를 변경된 경우..   

만약 포트번호가 1789, id가 test001, 접속주소가  127.0.0.1  인 경우


>sftp -oPort=1789  test001@127.0.0.1


>ssh -ltest001 -p1789 127.0.0.1


'linux' 카테고리의 다른 글

리눅스 find cp 혼합  (0) 2015.07.29
traceroute 명령어  (0) 2014.12.10
gzip 사용법  (0) 2014.03.27
hp unix, ibm unix 한글 언어 확인  (0) 2014.03.24
crontab 설정  (0) 2014.03.13
Posted by 무세1
,

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
,