[Shell]Create a file having a specific size

Last update on October 29, 2008 04:43 AM by netty5
Published by netty5

Shell]Create a file having a specific size






The dd command allows you to create "empty" file of desired size, creating these arbitrary heavy files, may be useful for testing purposes.

Use command below:

dd if=/dev/zero of=file_to-create bs=1k count=1000


This command results in the creation of an empty 1GB file

(1000 represents 1000 blocks of 1Kb)
Best answers for « Create a file having a specific size » in :
Creation of file with specific size Show Creation of file with specific size The command dd allows you to create new files with specific size in order to avoid creating large sized file for testing purposes: dd if=/dev/zero of=file_to_create bs=1k count=1000 The above...
Creating an empty file Show Creating an empty file To create an empty file, type the following command: > file You can also use the touch command: touch file
Creating an Autorun.inf file ShowCreating an Autorun file Allowing autorun Creating an Autorun.inf file Variations Customizing the icon Customizing the icon text Customizing the icon menu Allowing autorun Windows provide users with simple utility that runs...
Unable to attach files ShowUnable to attach files It may happen that when uploading files as attachment under Outlook Express, it takes a long time and finally do not send same to recipients. This may be due to high volume size of the file which however unable...
Writing in batch in text file ShowWriting in batch in text file To write in a file text, you just have to use a redirect: echo text > output_file.txt To write in an existing file: echo " Write at the end of the file ">> output_file.txt
Download Ext2 Installable File System ShowIf you currently have Windows running and you realize that you need some files for your work which you have stored on an Ext2 volume of your Linux installation, you no longer have to shut down Windows and boot Linux! Furthermore, Windows will now...
Partition - Partitioning a hard drive ShowWhat is a partition? The partitioning of a hard drive occurs after the drive has been physically formatted but before it is logically formatted. It involves creating areas on the disk where data will not be mixed. It can be used, for example, to...
JPEG compression ShowJPEG compression The acronym JPEG (Joint Photographic Expert Group comes from the meeting held in 1982 of a group of photographic experts, whose main concern was to work on the ways to transmit information (still or animated images). In 1986, the...
MS DOS Files and directories ShowFiles in MS DOS In a computers data is stored in files. When you run a program, MS-DOS processes the data stored in the file and passes it to the system. In MS-DOS a file can be any size, however the file name is more restricted, it can only have...