반응형

2020/12/14 4

리눅스 시스템에서 Find 명령어 사용법 #Find Command Tutorial in Linux #Find 명령어 옵션 #파일 찾기 리눅스

리눅스 시스템에서 Find 명령어 사용법 #Find Command Tutorial in Linux #Find 명령어 옵션 #파일 찾기 리눅스 1. 디렉토리 찾기 $find /path/to/search -type d -name "name-of-dir" 2. 숨김 파일 찾기 (Find Hidden Files) $find /path/to/search -name ".*" 3. 10MB 보다 큰 파일 찾기 $find /path/to/search -size +10M 4. 10MB 보다 작은 파일 찾기 $find /path/to/search -size -10M 5. 10MB 크기를 가진 파일 찾기 $find /path/to/search -size 10M 6. 파일의 크기가 10MB 보다는 크고 1GB 보다는 작은 파..

#연구/#Tech 2020.12.14

[파이썬/Python] 파이썬으로 CSV 파일 파싱하기 #CSV 파일 읽기 #Parsing a CSV File

[파이썬/Python] 파이썬으로 CSV 파일 파싱하기 #CSV 파일 읽기 #Parsing a CSV File 1. CSV DictReader import csv with open("/path/to/dict.csv") as my_data: csv_mapping_list = list(csv.DictReader(my_data)) 2. CSV reader import csv csv_mapping_list = [] with open("/path/to/data.csv") as my_data: csv_reader = csv.reader(my_data, delimiter=",") line_count = 0 for line in csv_reader: if line_count == 0: header = line else..

#연구/#Python 2020.12.14

[파이썬/Python] 파일 존재 유무 체크하기 #Checking if a File Exists in Python #파일이 있는지 체크하기

[파이썬/Python] 파일 존재 유무 체크하기 #Checking if a File Exists in Python #파일이 있는지 체크하기 파이썬에서 특정 파일이 존재하는지 체크하는 방법을 3가지 소개합니다. 간단한 방법이므로, 기호에 맞게 사용하시면 될 것 같습니다. 1. try-except block (Python 3+) try: with open('/path/to/file', 'r') as fh: pass except FileNotFoundError: pass 2. OS package import os exists = os.path.isfile('/path/to/file') 3. Using Path Object from pathlib import Path config = Path('/path/to/..

#연구/#Python 2020.12.14
반응형