|
|
Data ONTAP® PowerShell Toolkit
|
Cmdlet: Read-NaFile
NAME
Read-NaFile
SYNOPSIS
Read data from a named file.
SYNTAX
Read-NaFile [-Path] <String> [-Raw] [-Controller <NaController>] [<CommonPar
ameters>]
Read-NaFile [-Path] <String> [-Raw] [-Controller <NaController>] -Length <In
t64> -Offset <Int64> [<CommonParameters>]
DESCRIPTION
Read data from a named file.
Note that this API is provided primarily for administrative purposes. It is
not intended for high-performance I/O.
PARAMETERS
-Path <String>
Path of the file, i.e. /vol/<volumename>/<filename>.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Raw
Specify to get the file data as a byte array. This option is useful for
non-ASCII files, such as binary or unicode files.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Controller <NaController>
The Data ONTAP controller object, embodied by an NaController object. T
his parameter is returned by the Connect-NaController cmdlet. If not sp
ecified, the value in the global variable CurrentNaController is used.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Length <Int64>
Number of bytes to read from the file. If not specified, the entire fil
e is read.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Offset <Int64>
Offset into file to start reading from. If not specified, the file is r
ead from the beginning.
Required? true
Position? named
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".
INPUTS
OUTPUTS
System.String
NOTES
Category: file
API: file-read-file
-------------- Example 1 --------------
C:\PS>Read-NaFile /vol/vol0/etc/hosts
Read the /etc/hosts file.
#Auto-generated by setup Tue Mar 24 18:18:19 GMT 2009
127.0.0.1 localhost
10.61.167.60 dunn dunn-e0a
# 0.0.0.0 dunn-e0b
# 0.0.0.0 dunn-e0c
# 0.0.0.0 dunn-e0d
10.61.160.6 sportster
RELATED LINKS
Write-NaFile
Get-NaFile
| Copyright © 2012 NetApp. All rights reserved. Use is subject to license terms. |
|
Data ONTAP® PowerShell Toolkit
|