백업 등 특정 파일을 가지고 테스트를 해볼 때, fallocate 명령어는 유용하게 사용할 수 있다.
생성된 파일내용은 없으며, 크기만 할당된다.
1. 10Byte 크기의 파일을 생성하기
$ fallocate -l 10 file # -l : 지정한 크기만큼의 용량의 파일 만들기 (Byte)
$ ls -l file
.... .... 10 Feb 27 15:30 file
$ fallocate -l 10k file # 10 kilo Bytes
$ fallocate -l 10m file # 10 Mega Bytes
$ fallocate -l 10g file # 10 Giga Bytes
'Linux > RedHat, CentOS, ubuntu' 카테고리의 다른 글
[ Linux ] Crontab 예제 (0) | 2022.10.31 |
---|---|
[ Linux ] timedatectl 명령어를 이용한 한국 타임존 변경 (0) | 2022.09.27 |
[ CentOS 7 ] freetds를 이용하여 MSSQL에 연결 (0) | 2021.04.02 |
apache httpd.conf 문법 검사 명령어 (0) | 2021.03.26 |
[CentOS] timezone 변경하기 (0) | 2020.03.24 |
CentOS7 mariadb port 변경 (0) | 2020.01.31 |
[ CentOS ] python3로 변경 후 YUM 실행시 SyntaxError: invalid syntax 원인과 해결 방법 (0) | 2019.12.20 |
[리눅스 명령어] tee 표준입력으로부터 표준출력과 파일로 저장 (0) | 2019.11.25 |