본문 바로가기

프로그래밍/기타41

[Linux, Ubuntu] 디스크의 정보 보는 방법 (fdisk, 용량, 타입) - 디스크 정보 보는 방법 (fdisk -l) > USB 메모리 스틱의 정보 ubuntu@ubuntu-VirtualBox:~$ sudo fdisk -l [sudo] password for ubuntu: // 중간 생략 Disk /dev/sdb: 14.33 GiB, 15376318464 bytes, 30031872 sectors Disk model: Cruzer Force Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 2C107E83-A.. 2021. 5. 9.
[Linux, Ubuntu] USB 메모릭 스틱/장치 ID, 마운트 위치 알아내기 ○ USB 장치 ID, 정보 알아내기 (lsusb) - 버추얼 박스 우분투에 USB 메모리 스틱을 인식한 모습 (SanDisk Corp. Cruzer Force (64GB)) ubuntu@ubuntu-VirtualBox:~$ lsusb Bus 001 Device 003: ID 0781:557d SanDisk Corp. Cruzer Force (64GB) Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub - lsusb 사용법 ubuntu@ubuntu-VirtualBox:~$ lsusb --help Usage: lsusb [options]... Li.. 2021. 5. 9.
[Linux, Ubuntu] 파일 속성 보는 방법 (파일 크기, 생성 시간, 수정 시간) - stat [옵션 또는 파일 이름] ubuntu@ubuntu-VirtualBox:~$ stat test.db File: test.db Size: 32768 Blocks: 64 IO Block: 4096 regular file Device: 805h/2053dInode: 3936052 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ ubuntu) Gid: ( 1000/ ubuntu) Access: 2021-03-25 12:05:32.531009839 +0900 Modify: 2021-03-25 10:47:08.260042693 +0900 Change: 2021-03-25 10:47:08.260042693 +0900 Birth: - Size : 파일 크기 (바이트, b.. 2021. 5. 9.
[Linux, Ubuntu] 파일 검색하는 방법, 특정 파일 찾아서 삭제하기 (find) ○ 파일 검색 1. find [검색 시작 위치] [검색 옵션] 2. 사용 예 - 특정 파일 검색 (test.tgz 파일 찾기) find . -name test.tgz - 특정 글자를 포함하는 파일 또는 폴더 검색 (test로 시작하는 파일 검색) find . -name test* -type f * 옵션 > test* : test로 시작하는 경우 > *test : test 문자가 뒤에 붙은 경우 -type f : 파일 타입 -type d : 디렉토리 타입 (폴더) - 확장자가 tgz 파일 검색 (또는 find . -name "*.tgz") find . -name *.tgz - 파일 이름이 test를 포함하고 확장자가 tgz인 파일 검색 find . -name test* -a -name *.tgz - 파일 .. 2021. 5. 9.