Get-AzDataLakeGen2Item
Pobiera szczegóły pliku lub katalogu w systemie plików.
Składnia
Get-AzDataLakeGen2Item
[-FileSystem] <String>
[-Path <String>]
[-Context <IStorageContext>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Opis
Polecenie cmdlet Get-AzDataLakeGen2Item pobiera szczegóły pliku lub katalogu w systemie plików na koncie usługi Azure Storage. To polecenie cmdlet działa tylko wtedy, gdy hierarchiczna przestrzeń nazw jest włączona dla konta magazynu. Tego rodzaju konto można utworzyć za pomocą polecenia cmdlet "New-AzStorageAccount" za pomocą polecenia "-EnableHierarchicalNamespace $true".
Przykłady
Przykład 1. Pobieranie katalogu z systemu plików i wyświetlanie szczegółów
$dir1 = Get-AzDataLakeGen2Item -FileSystem "filesystem1" -Path "dir1/"
$dir1
FileSystem Name: filesystem1
Path IsDirectory Length LastModified Permissions Owner Group
---- ----------- ------ ------------ ----------- ----- -----
dir1 True 2020-03-23 09:15:56Z rwx---rwx $superuser $superuser
PS C:\WINDOWS\system32> $dir1.ACL
DefaultScope AccessControlType EntityId Permissions
------------ ----------------- -------- -----------
False User rwx
False Group ---
False Other rwx
PS C:\WINDOWS\system32> $dir1.Permissions
Owner : Execute, Write, Read
Group : None
Other : Execute, Write, Read
StickyBit : False
ExtendedAcls : False
PS C:\WINDOWS\system32> $dir1.Properties.Metadata
Key Value
--- -----
hdi_isfolder true
tag1 value1
tag2 value2
PS C:\WINDOWS\system32> $dir1.Properties
LastModified : 3/23/2020 9:15:56 AM +00:00
CreatedOn : 3/23/2020 9:15:56 AM +00:00
Metadata : {[hdi_isfolder, true], [tag1, value1], [tag2, value2]}
CopyCompletedOn : 1/1/0001 12:00:00 AM +00:00
CopyStatusDescription :
CopyId :
CopyProgress :
CopySource :
CopyStatus : Pending
IsIncrementalCopy : False
LeaseDuration : Infinite
LeaseState : Available
LeaseStatus : Unlocked
ContentLength : 0
ContentType : application/octet-stream
ETag : "0x8D7CF0ACBA35FA8"
ContentHash :
ContentEncoding : UDF12
ContentDisposition :
ContentLanguage :
CacheControl : READ
AcceptRanges : bytes
IsServerEncrypted : True
EncryptionKeySha256 :
AccessTier : Cool
ArchiveStatus :
AccessTierChangedOn : 1/1/0001 12:00:00 AM +00:00
To polecenie pobiera katalog z systemu plików i wyświetla szczegóły.
Przykład 2. Pobieranie pliku z systemu plików
Get-AzDataLakeGen2Item -FileSystem "filesystem1" -Path "dir1/file1"
FileSystem Name: filesystem1
Path IsDirectory Length LastModified Permissions Owner Group
---- ----------- ------ ------------ ----------- ----- -----
dir1/file1 False 1024 2020-03-23 09:20:37Z rwx---rwx $superuser $superuser
To polecenie pobiera szczegóły pliku z systemu plików.
Parametry
-Context
Obiekt kontekstu usługi Azure Storage
Type: | IStorageContext |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
Poświadczenia, konto, dzierżawa i subskrypcja używane do komunikacji z platformą Azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FileSystem
Nazwa systemu plików
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Path
Ścieżka w określonym systemie plików, który ma zostać pobrany. Może być plikiem lub katalogiem w formacie "directory/file.txt" lub "directory1/directory2/". Nie określ tego parametru, aby uzyskać katalog główny systemu plików.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Dane wejściowe
Dane wyjściowe
Opinia
https://aka.ms/ContentUserFeedback.
Dostępne już wkrótce: W 2024 r. będziemy stopniowo wycofywać zgłoszenia z serwisu GitHub jako mechanizm przesyłania opinii na temat zawartości i zastępować go nowym systemem opinii. Aby uzyskać więcej informacji, sprawdź:Prześlij i wyświetl opinię dla