#dd if=/dev/sda of=./file.txt bs=1M count = 100
(to create a file of 100 MB size)
# mkfs.ext4 -t ext4 file.txt
#mkdir /tmp/file
#sudo mount -t ext4 file.txt /tmp/file
#touch /tmp/file/file1
This will create a file which will not grow beyond 100 MB.
very useful when we are creating log files or file on which we want to set limit.
Be the first to comment.