NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

ONTAP Discussions

using conditional execution in CLI

mgilbert
4,445 Views

Is there a way to use conditional logic on the OnTap CLI between different fields? Like if I wanted to get all users that are over 1TB OR using more than 1million files? E.g. something like

quota report (-disk-used >1TB | -files-used >1000000)
3 REPLIES 3

Girton
4,293 Views

I don't have access to a cluster that has quotas enabled, so I wasn't able to get any real results, but I was able to successfully execute a CLI command similar to what you provided:

quota report -disk-used >1tb -files-used > 1000000

 

Have you tried running a similar command?

GidonMarcus
4,254 Views

Hi @Girton ,

 

i think he wishes to make an OR statement rather an AND - that your example will result.

i tried to find a way as well. but the only thing worked for me is just to execute the command twice...

quota report -disk-used >100g;quota report -files-used >500

 

Gidi

Gidi Marcus (Linkedin) - Storage and Microsoft technologies consultant - Hydro IT LTD - UK

mgilbert
4,213 Views

Thank you for the reply. You are correct; that's what I was going for. I guess I'll just have to settle for looking for similarities between two separate commands.

Public