기본 문법

sudo find / -iname [파일 이름] -type f -ls
sudo find / -iname [폴더 이름] -type d -ls
  • -type f -ls : 파일 검색
  • -type d -ls : 폴더 검색

검색 예시

‘*’은 ‘모든’이라는 뜻을 가진 유닉스 와일드 카드입니다.

  • mp4 파일 형식의 모든 동영상 검색 ▼
sudo find / -iname '*.mp4' -type f -ls
  • mov 파일 형식의 모든 동영상 검색 ▼
sudo find / -iname '*.mov' -type f -ls
  • 비밀‘ 이란 이름이 들어간 모든 파일 검색 ▼
sudo find / -iname '*비밀*' -type f -ls
  • Japanese‘라는 이름이 들어간 모든 폴더 검색 ▼
find / -name '*Japanese*' -type d -ls

 참고 사항

루트(/) 레벨부터 색인을 시작하면 아무래도 시간이 꽤 소요됩니다. 아마도 홈디렉토리(~) 레벨부터 검색하셔도 대부분의 파일을 색출하실 수 있을겁니다. 위에서 언급한 커맨드의 ‘/’만 ‘~’로  치환해주시면 됩니다.

sudo find ~ -iname '*.mp4' -type f -ls

그리고 ‘ls’ 형식의 출력이 싫으시다면 뒤에 붙은 ‘-ls’를 삭제하시면 됩니다.

sudo find ~ -iname '*.mp4' -type f


블로그 이미지

요다할아범

,

http://copynull.tistory.com/283

블로그 이미지

요다할아범

,

최근 Outlook 2016 버전에서 첨부파일 중 엑셀 파일 클릭 시 미리보기 지원이 안되어 해결 방법을 찾아 공유 합니다.

 

다음과 같이 Excel 관련 레지스트리 값을 수정하여 문제를 해결하였습니다.

  1. 열려있는 Outlook을 종료합니다.

  2. Windows키와 R키를 동시에 클릭하여 실행 창에서 regedit를 입력 후 확인을 누릅니다.

  3. 다음 경로로 이동합니다.

  4. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PreviewHandlers

  5. 다음 키를 선택 후 삭제합니다. {00020827-0000-0000-C000-000000000046}
  6. ​빈 영역에서 오른 쪽 마우스 클릭 후 새로 만들기 - 문자열 값(s)를 클릭합니다. 

  7. 이름을 {00020827-0000-0000-C000-000000000046}입력합니다.
  8. 해당 값을 오른쪽 마우스 클릭 후 수정을 클릭합니다.

    해당값을오른쪽마우스클릭수정을클릭합니다.


  9. 데이터에Excel Previewer 입력후 확인을 클릭합니다.

  10. Outlook을 다시 열어 문제가 해결 되었는지 확인 합니다.


블로그 이미지

요다할아범

,
def name = context.expand( '${Input#TG}' )
def locatie = context.expand( '${#TestCase#locatie}' )

def createFolder(locatie) {
date = new Date()
dateFormat = new java.text.SimpleDateFormat('ddMMyyyy')
shortDate = dateFormat.format(date)
outputFolder = locatie+shortDate
createFolder = new File(outputFolder)
createFolder.mkdir()
}

def getResponseFilename(shortDate,name) {
date = new Date()
dateFormat = new java.text.SimpleDateFormat('ddMMyyyy HH:mm:ss')
shortDate = dateFormat.format(date)
respFilename = shortDate+"_"+name+"_response.xml"
}

def getRequestFilename(shortDate,name) {
date = new Date()
dateFormat = new java.text.SimpleDateFormat('ddMMyyyy HH:mm:ss')
shortDate = dateFormat.format(date)
reqFilename = shortDate+"_"+ name+"_request.xml"
}

def file = new PrintWriter (createFolder(locatie)+getResponseFilename(shortDate,name))
def response = testRunner.testCase.testSteps["CheckAdres"].testRequest.response.contentAsString
file.println(response)
file.flush()
file.close()

def file2 = new PrintWriter (createFolder(locatie)+getRequestFilename(shortDate,name))
def request = context.expand('${CheckAdres#Request}')
file2.println(request)
file2.flush()
file2.close()


You could start with a different date format, since ":" is not accepted in a filename, try:

shortDate = new Date().format("ddMMyyyy HHmmss").toString();



The error occurs because of your line:

def file = new PrintWriter (createFolder(locatie)+getResponseFilename(shortDate,name))



If I run the following line against your script, it returns a boolean, hence the boolean.plus.

log.info createFolder(locatie)



The script seems to run if I add the following line at the end of createFolder(locatie):

return outputFolder


블로그 이미지

요다할아범

,

import java.io.File

import java.util.Date

import jxl.*


import groovy.xml.MarkupBuilder

import org.custommonkey.xmlunit.*


//read excelfile

wb = Workbook.getWorkbook(new File('C:/.../ChangedData.xls'))


sheet = wb.getSheet(0)


def writer = new FileWriter('C:/.../data.xml')

def xml = new MarkupBuilder(writer)

xml.mkp.xmlDeclaration(version: "1.0", encoding: "utf-8")

//=======================

//xml.users(){user(count:'i')



   for (int i=1; i<sheet.getRows();i++) {



      for (int j=0; j<sheet.getColumns(); j++){

           p=sheet.getCell(j,i).getContents()



      log.info p

       }

   }

}

wb.close()

블로그 이미지

요다할아범

,