전체 글 (70) 썸네일형 리스트형 일정 시간 이상 경과한 로그 지우는 스크립트 퍼옴(http://www.mungchung.com/xe/index.php?mid=protip&listStyle=webzine&document_srl=4456&sort_index=regdate&order_type=asc) #!/bin/sh # 2009-04-29 손민창 #==================================================================== # tomcat log 삭제 #==================================================================== # 변수설정 LOG_DIR=/home1/dev/tomcat/logs DATE=`date +%Y-%m-%d` # 날짜별 catalina.out 기록 cp $LOG_DI.. swap 영역 할당하기 이미 할당된 파티션을 swap 영역으로 지정하는 자료들은 쉽게 찾을 수 있지만, 새로운 디스크를 fdisk로 부터 시작해서 swap 영역으로 만드는 것 까지 풀코스로 정리된 것을 찾지 못했다. 이번에 그런 일을 할 일이 있어서 정리해 둔다. 1. 사전 준비 - 디스크 하나를 통으로 swap 잡는다 : /dev/xvdp 2. fdisk로 파티션 추가 $ fdisk /dev/xvdp 1) n->p->1->default->default 새로 파티션 영역을 추가하는데, 그것은 primary. 처음 잡는 것이니 1번으로 하고(이렇게하면 xvdp1이라고 생기는것), 시작과 끝은 default로(모두 swap으로 사용). 2) t->L->82 swap 타입을 지정해 줌. 3) w : 변경 사항 기록(이거 안해서 첨부.. [MFC] 빈 폴더 삭제(delete empty folder) void CTestDlg::OnOK() { // TODO: Add extra validation here DelEmptyFolder("C:\\Documents and Settings\\이윤기\\바탕 화면\\수동\\drmone.war"); CDialog::OnOK(); } BOOL CTestDlg::DelEmptyFolder(CString strPath) { CFileFind finder; int nValidCnt = 0; BOOL bWorking = finder.FindFile(strPath + "\\*.*"); while (bWorking) { bWorking = finder.FindNextFile(); if(finder.IsDots()) continue; else if(finder.IsDirector.. [MFC] CFolderDialog 예제 TCHAR szDestPath[MAX_PATH]; LPCTSTR lpszTitle = _T( "Select the root folder for the browse dialog:" ); UINT uFlags = BIF_RETURNONLYFSDIRS | BIF_USENEWUI; CFolderDialog dlgRoot(lpszTitle, szDestPath, this, uFlags ); if( dlgRoot.DoModal() == IDOK ) { lstrcpy(szDestPath, dlgRoot.GetFolderPath()); } [MFC] 디렉토리 recursive 탐색 소스 코드 첫번째 예제 void __stdcall EnumDirectory(LPCTSTR lpPath) { if(lpPath == NULL) return ; TCHAR szPath[560] = {0, }; wsprintf(szPath, _T("%s"), lpPath); if(szPath[_tcslen(szPath) - 1] == '\\') szPath[_tcslen(szPath) - 1] = NULL; TCHAR szFindPath[560] = {0, }; wsprintf(szFindPath, _T("%s\\*.*"), szPath); WIN32_FIND_DATA wfd; ZeroMemory(&wfd, sizeof(WIN32_FIND_DATA)); TCHAR szFilePath[560] = {0, }; HANDLE.. 이전 1 ··· 6 7 8 9 10 11 12 ··· 14 다음 목록 더보기