ONTAP Discussions

How to check what are sub-folders and files available in a qtree using privilage access in Cdot

koushi
12,484 Views

Hi All,

 

Can anyone please let me know is there anyway to navigate inside the Qtree using privilage mode in Cdot.

 

To be on more insight.

 

I can do the same thing to chek in 7mode using ls command using privilage mode.  Need to know what need to be done in Cdot.

 

Thanks

Koushik

3 REPLIES 3

mbeattie
12,468 Views

Hi Koushi,

 

See the following PowerShell CmdLets

 

PS C:\> get-help get-ncfile

NAME
    Get-NcFile

SYNOPSIS
    Obtains information for a file or directory.

SYNTAX
    Get-NcFile [-Path] <String> [-VserverContext <String>] [-Controller <NcController[]>] [<CommonParameters>]

DESCRIPTION
    Obtains information for a file or directory.


PS C:\> get-help get-ncqtree

NAME
    Get-NcQtree

SYNOPSIS
    List the qtrees in a cluster or vserver.

SYNTAX
    Get-NcQtree [[-Volume] <String[]>] [[-Qtree] <String[]>] [-VserverContext <String>] [-Attributes <QtreeInfo>] [-Controller <NcController[]>] [<Co
    mmonParameters>]

    Get-NcQtree [-VserverContext <String>] -Template [-Controller <NcController[]>] [<CommonParameters>]

    Get-NcQtree [-VserverContext <String>] -Query <QtreeInfo> [-Attributes <QtreeInfo>] [-Controller <NcController[]>] [<CommonParameters>]

DESCRIPTION
    List the qtrees in a cluster or vserver.

It should be possible for you to list the files and directories within a qtree on vserver using these cmdlets.

 

/matt

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

koushi
12,463 Views

Thanks Matt for your prompt response.

 

Actually i need to get the details from filer prompt itself not from Powershell .., As it plays a key role when working on ndmp restores and to check for locks path.

Can you please let me know.

 

Thanks again.

mbeattie
12,455 Views

Hi Koushi,

 

You can still use the "ls" command in cdot but it's within the node shell. EG

 

cluster1::*> set -privilege diag

cluster1::*> node run -node node_001 -command "ls /vol/volume_001"

.
..
qtree_001

cluster1::*> node run -node node_001 -command "ls /vol/volume_001/qtree_001"
.
..
folder_001

/matt

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Public