2024/12 116

ubuntu 폴더내 파일 개수 확인

1. find 명령어 사용 (리눅스/유닉스)폴더 내 모든 파일 개수find /path/to/directory -type f | wc -l/path/to/directory: 확인하려는 폴더 경로.-type f: 파일만 검색.wc -l: 파일 개수 세기.특정 확장자의 파일 개수find /path/to/directory -type f -name "*.txt" | wc -l-name "*.txt": 특정 확장자(.txt)의 파일만 검색.2. ls 명령어 사용현재 디렉토리 내 파일 개수ls -1 /path/to/directory | wc -l-1: 파일 이름을 한 줄씩 출력하여 정확한 개수를 계산.하위 폴더 포함 파일 개수ls -lR /path/to/directory | grep '^-' | wc -l-lR: 하..

세팅/ubuntu 2024.12.12

대용량 파일 카피

단일 쓰래드로..rsync -avP /home/hyunkoo/DATA/ssd8tb/Journal/MagicDrive/data/nuscenes/nuscenes_gt_database/ ./nuscenes_gt_database/ 멀티 쓰래드로..find /home/hyunkoo/DATA/ssd8tb/Journal/MagicDrive/data/nuscenes/nuscenes_gt_database -type f | \parallel -j 4 rsync -avP {} ./data/nuscenes_gt_database/  find: 복사할 파일 목록 생성.parallel: 파일 복사를 병렬로 처리.-j 4: 병렬로 실행할 작업 수(4개의 쓰레드).  또는  sudo apt install rclone rclone co..

세팅/ubuntu 2024.12.12

105. Construct Binary Tree from Preorder and Inorder Traversal

105. Construct Binary Tree from Preorder and Inorder Traversal https://youtu.be/ihj4IQGZ2zc?si=xp7MO4VGo3NIKjnW class Solution: def buildTree(self, preorder: List[int], inorder: List[int]) -> Optional[TreeNode]: # 문제 접근법: # 1. Preorder 배열의 첫 번째 값은 항상 현재 서브트리의 루트 노드 값입니다. # 1. The first value in the preorder array is always the root node of the current subtree. # 2...