리눅스 find 명령(파일찾기, 0바이트 파일 찾기)

find 라는 명령으로, 디스크에 저장된 각종 파일/디렉토리를 검색할 수 있습니다. 파일 찾기 (파일명 검색) 현재 디렉토리에서, pl 확장자를 가진 모든 파일 찾기find -name '*.pl' (현재 디렉토리 밑의 하위 디렉토리까지 다 찾습니다.) 루트에서부터, 즉 전체 하드에서, pl 확장자를 가진 모든 파일 찾기find / -name '*.pl' 전체 하드 디스크에서, 파일명이 ab 로 시작하는 모든 파일 찾기find / -name 'ab*' … 계속 읽기 리눅스 find 명령(파일찾기, 0바이트 파일 찾기)

크로스사이트스크립트 필터(XSS)

일번적으로 <를 &lt; 로, 또는 >를 &gt; 로만 잡아주면 되지만,부득이한 상황으로 그렇게 못할 경우 아래 코드를 사용한다. iframe을 i_rame으로 2번째 문자를 _로 바꿔주는 형식이다. package com.mySite.utils; public class XssUtils { public static final String[] ignoreKeyword = new String[]{ // "<" // ,">" "\"" // ,"%22" ,"'" // ,"%27" // ,"%" // ,"&" ,"%00" // ,"\\(" … 계속 읽기 크로스사이트스크립트 필터(XSS)

JAVA 한글깨짐

아래처럼 한번에 테스트하니깐 속이 편하다. String title = "한글이 깨져서 뚁땅해~"; System.out.println("euc-kr → utf-8: " + new String(title.getBytes("euc-kr"), "utf-8")); System.out.println("euc-kr → ksc5601: " + new String(title.getBytes("euc-kr"), "ksc5601")); System.out.println("euc-kr → x-windows-949: " + new String(title.getBytes("euc-kr"), "x-windows-949")); System.out.println("euc-kr → iso-8859-1: " + new String(title.getBytes("euc-kr"), "iso-8859-1")); System.out.println("utf-8 → euc-kr: " + new String(title.getBytes("utf-8"), "euc-kr")); System.out.println("utf-8 → ksc5601: " … 계속 읽기 JAVA 한글깨짐