SCP ?
시큐어 카피(Secure copy) 또는 SCP 는 로컬 호스트와 원격 호스트 간 또는 두 개의 원격 호스트 간에 컴퓨터 파일을 안전하게 전송하는 수단이다.
시큐어 셸(SSH) 프로토콜 기반이다.
SCP 라는
SCP ?
시큐어 카피(Secure copy) 또는 SCP 는 로컬 호스트와 원격 호스트 간 또는 두 개의 원격 호스트 간에 컴퓨터 파일을 안전하게 전송하는 수단이다.
시큐어 셸(SSH) 프로토콜 기반이다.
SCP 라는
일반적으로 많은 사람들이 em단위를 쓰면 해상도에 따라서 크기가 달라진다고 오해하는 경우가 많습니다.
하지만 em을 쓰는 이유는 IE6과 같이 zoom기능이 없는 브라우저에서 브라우저의 글꼴 크기 옵션을 조절했을 때 동작하게 하기 위함입니다.
Beyond grep 으로 알려진 ack는 우리에게 친숙한 grep 의 확장 프로그램이다. ( http://beyondgrep.com/ )
grep 과 ack 의 차이점
grep 에서는 -r 옵션을 선언해야 하위폴더까지 체크하지만 ack 는 -r 옵션을 기본적으로 포함하고
0 1 2 3 4 5 6 7 8 9 10 11 |
SELECT table_schema "team", SUM(data_length + index_length) / 1024 / 1024 "Size(MB)" FROM information_schema.TABLES GROUP BY table_schema; +--------------------+------------+ | team | Size(MB) | +--------------------+------------+ | information_schema | 0.14062500 | | mysql | 0.62320518 | | performance_schema | 0.00000000 | | team | 0.14011765 | +--------------------+------------+ 4 rows in set (0.01 sec) |
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<% Dim Conn,db Set Conn = Server.CreateObject("ADODB.Connection") str = "Provider=SQLOLEDB;Data Source=서버IP;Initial Catalog=DB이름;user ID=아이디;password=비번;" Conn.Open str Conn.Close Set Conn=Nothing %> |
0 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
#!/bin/bash ####################################################################################### # Path 설정 및 환경 설정 ####################################################################################### # 서버 캐릭터셋 확인 char=`echo $LANG|cut -d"." -f2|tr [A-Z] [a-z]` # IP 추출 ServerIp=`hostname -I` # 폴더 리스트 확인 Function function FileList { for FILE in `ls $1` do echo "$FILE" done } # 오늘날짜 Today=`/bin/date '+%F' | sed -e 's/-//g'` LogDir="$Today.access_log" Search_Day=`/bin/date | awk '{print $3"/"}' | sed -e 's/\.//g'` ####################################################################################### echo -e "\e[32;1m조회할 도메인을 입력해주세요. ex) infree.kr \e[0m"|iconv -futf-8 -t$char echo "" echo -n "도메인 : "|iconv -futf-8 -t$char read Search_Domain echo "" # virtual.conf path HttpPath=`ps -ef | grep httpd | head -1 | awk '{print $8}' | cut -f1,2,3,4 -d"/"` VirPath=`grep -r $Search_Domain $HttpPath | sed -e 's/:/ /g' | awk '{print $1}' | head -1` # access_log path LogPath="$HttpPath/logs/access_log" # 기본 폴더 생성 CheckSearchDomain=`/bin/grep "ServerName $Search_Domain" $VirPath | wc -l` UserPath=`/bin/grep -B1 "ServerName $Search_Domain" $VirPath | grep DocumentRoot | head -1 | cut -f2 -d" "` BasePath=$UserPath/$LogDir # 조회할 도메인 존재 여부 체크 echo -e "\e[33;1m입력하신 도메인은 [ $Search_Domain ]입니다. [ $Search_Domain ]으로 조회 시작하겠습니다. \e[0m"|iconv -futf-8 -t$char echo "" rm -rf $BasePath mkdir -p $BasePath # 로그 파일 UserLogFile="$UserPath/$LogDir/1.$Search_Domain.txt" # 기본 로그 생성 grep $Search_Domain $LogPath | grep $Search_Day | grep -v $ServerIp | awk '{print $2 " : " $5 "] : " $1$8 " : " $12 " : "$11}' > $UserLogFile # 접속 IP 리스트 (방문자 리스트) cat $UserLogFile | awk '{print $1 }' | sort | uniq -c | sort -r | awk '{print $2 }' > $UserPath/$LogDir/2.iplist.txt Today_visit=`cat $UserPath/$LogDir/2.iplist.txt | wc -l` # 파일별 접속 파일 리스트 (많은 순 정렬) cat $UserLogFile | awk '{print $5 }' | sort | uniq -c | sort -r > $UserPath/$LogDir/3.max_pageview_list.txt echo -e "\e[32;1m$(date '+%H:%M:%S') :: IP별 트래픽 사용량 조사를 합니다. 오래 걸리니 차 한잔하고 오세요.^^ \e[0m"|iconv -futf-8 -t$char echo "" # 접속 IP 별 트래픽 발생량 (많은 순 정렬) for IP in `cat $UserPath/$LogDir/2.iplist.txt`; do touch $UserPath/$LogDir/4.ip_traffic.txt IPTrafficCheck=`grep $IP $UserLogFile | awk '{print NF}' | sed '/-/d' | awk '{print $1/1048576 }' | awk '{sum +=$1} END {print sum,"MByte" }'` echo $IP " : " $IPTrafficCheck done >> $UserPath/$LogDir/4.ip_traffic.txt echo -e "\e[32;1m$(date '+%H:%M:%S') :: IP별 트래픽 사용량 조사가 완료되었습니다. \e[0m"|iconv -futf-8 -t$char echo "" # 오늘 사용한 전체 트래픽 TodayTraffic=`cat $UserLogFile | awk '{print NF}' | sed '/-/d' | awk '{print $1/1048576 }' | awk '{sum +=$1} END {print sum,"MByte" }'` # 로그 퍼미션 변경 UserID=`grep -B 1 "ServerName $Search_Domain" $VirPath | head -1 | cut -f2 -d" " | cut -f4 -d"/"` chown $UserID.free -R $UserPath/$LogDir echo "" echo -e "\e[32;1m$Today :: 금일 전체 트래픽 : $TodayTraffic / 오늘 방문자 $Today_visit 명 \e[0m"|iconv -futf-8 -t$char echo "" echo -e "\e[32;1m가장 많이 접속한 IP 리스트 TOP 10 \e[0m"|iconv -futf-8 -t$char head $UserPath/$LogDir/2.iplist.txt echo "" echo -e "\e[32;1m가장 많이 접속한 IP의 트래픽 사용양 TOP 10 \e[0m"|iconv -futf-8 -t$char head $UserPath/$LogDir/4.ip_traffic.txt echo "" echo -e "\e[32;1m가장 많이 접속한 페이지 리스트 TOP 10 \e[0m"|iconv -futf-8 -t$char head $UserPath/$LogDir/3.max_pageview_list.txt echo "" echo -e "\e[32;1m로그파일은 $UserPath/$LogDir 에서 확인 할 수 있습니다. \e[0m"|iconv -futf-8 -t$char echo "" cd $UserPath/$LogDir ; ls -lh |