The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to register at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

ONTAP Discussions

ls command on C-Mode

JOHNBHOLA

Hello,

 

How we can use the ls command on C-Mode.

 

Regards,

Bhola Gond

1 ACCEPTED SOLUTION

JOHNBHOLA

One options i found out go to node run <node name>

Go to priv set advanced mode.

then you can use the ls command

but is there any options to use it on Admin vserver.

View solution in original post

4 REPLIES 4

Tonny

Hi,

 

Below command is a way of doing ls in C-Dot:


admin_node::> system node run -node filer_node-0* -command "priv set -q diag ; ls /vol/Volumename/"
2 entries were acted on.

Node: filer_node-01

/vol/Volumename/: Can't open directory: No such file or directory

Node: filer_node-02

.
..
L_lun015

JOHNBHOLA

One options i found out go to node run <node name>

Go to priv set advanced mode.

then you can use the ls command

but is there any options to use it on Admin vserver.

View solution in original post

shatfield

Not sure what you're trying to accomplish, but ls has very limited utility.  As you found, its available in the node shell, but all you can really do with it is ls /etc. 

dburklan

You can achieve this with the NetApp PowerShell Toolkit:

# Import the DataONTAP PowerShell module

Import-Module DataONTAP

# Connect to the appropriate NetApp cDOT Cluster

Connect-NcController -Name <Cluster Management IP Address>

# List the contents of the specified directory

Read-NcDirectory -VserverContext <Vserver Name> -Path /vol/<volume name>/<folder name>

Here is an example of these commands in action:

Cheers,

Dan

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public