6.2.8.8 mkfile
Create a file.
Purpose
The mkfile
command creates a file within a vault.
Syntax
mkfile filename [ --template template ] [ --attributes attribute=value[,attribute=value] ... ]
Command Options
The options for the mkfile
command are:
-
filename: Specifies the name of the file you are creating. The file name cannot contain wildcard characters. Only one file name can be specified.
-
--template
: Creates the file using the specified template. -
--attributes
: Optionally specifies attributes to change.Use the
describe mkfile
command to view details about all the file attributes you can set withmkfile
.
Usage Notes
Note the following information when using this command:
-
You can set the file size by specifying the
size
attribute.File sizes can be specified using suffixes
K
,KB
,M
,MB
,G
,GB
,T
,TB
. The suffix is not case-sensitive.Regardless of the file size setting, storage space is physically materialized only when the file contents is written. So, after the
mkfile
command, the file initially consumes no physical storage space. The file only consumes physical storage space when data is written to it. -
If you set any of the file storage attributes (
contentType
,mediaType
, andredundancy
), the specified value overrides the setting in the default template.For a description of the file storage attributes, see File Storage Attributes.
-
You can set the Exascale file type by specifying the
fileType
attribute.Every Exascale file type is associated with an Exascale template. So, you can view a complete list of the Exascale file types by using the ESCLI
lstemplate
command. For example:@> lstemplate --cluster
@> lstemplate --vault VAULT1
Examples
Example 6-102 Create a File in a Vault
The following example shows creating the file named x
within the
vault MYDATA
.
@MYDATA/> mkfile x --attributes size=20k
File created.
@MYDATA/> ls -l
20.0k 08 Jan 15:53 x
Related Topics
Parent topic: File Management