Server/Linux
[Linux] 대용량 파일 생성하기
1nfra
2022. 10. 5. 04:04
728x90
리눅스에서 대용량 파일 생성하는 명령어는 fallocate를 사용합니다.
fallocate -l 크기 파일명 |
예시로 100 byte 파일을 생성해보겠습니다.
[root@Centos7 test]# fallocate -l 100 test.txt [root@Centos7 test]# ll test.txt -rw-r--r--. 1 root root 100 Feb 5 08:37 test.txt |
다음으로 10G 파일을 생성해보겠습니다.
[root@Centos7 test]# fallocate -l 10G test.txt [root@Centos7 test]# ll -h test.txt -rw-r--r--. 1 root root 10G Feb 5 08:37 test.txt |
728x90