Administration Guides
Advanced Searching Syntax and Script Automation Editor
Home
- Use Cases
- How to Use the Script Automation Editor
- How to download very large scripts
- How to use the Script Editor
- Search Operators explained with examples
- How to search for directories only
- How to count the number of files at a path and below
- How to search the size field to find files with certain file size ranges
Use Cases
- admin Search: Finding email addresses in documents..
- Capacity Management: Find all files greater than or less than a size or in a range of file sizes.
How to Use the Script Automation Editor
The Script Automation editor icon on the UI allows administrators or end users to generate a script download that can automate some tasks with the results of a search. The CSV and script download icons limit results to 100 000 rows, any search results over this limit will automatically run as a server side job to create the file that is available from the secure download URL.
How to download very large scripts
- The server side download URL provides backup archive, and CSV script downloads.
- Using a browser access the URL below (NOTE: the secure access userid and password are required). Default userid is ecaadmin. The password is set during installation.
- https://x.x.x.x/downloads (x.x.x.x is node 1 of the search cluster)
How to use the Script Editor
- The window shown below allows users to select an absolute path in the script download (i.e. /ifs/data/.... ), which is useful when the script will be run directly on the PowerScale using ssh and a .sh script.
- The other option is to insert the UNC path in the downloaded script which enables a script to be run by users over SMB connections to the cluster. The UNC path is the SmartConnect address and SMB share to reach the file over the network. This allows powershell or batch cmd files to run automation against a result of files.
- The other option available in the script download is plan file download with rows "Plain" option. This would be used when the script language needs to be changed or modified. Typically used when bash shell execution will not be used. The Shell option will add bash shell and download the file with a .sh extension so that the file can be copied to PowerScale to be run on the cluster itself. This would typically be used by PowerScale administrators.
- Enter the script action in the first dialog (i.e. cp, mv , del, rm etc..) depending on the script language you plan to use. Enter the output of the command which could use >> results.txt , or | grep "some string to look at".
- Examples:
- isi get -d
- cp
- mv
- Examples:
Search Operators explained with examples
- + and - term operator
- ? single character wild card
- * multiple character wild card
- fieldname: (specific schema search examples below):
- filesize: (file size in bytes).
- extension: (file extension).
- language_s: (detected language of the document).
- clustername: (cluster name).
- ishidden: (hidden file in the file system).
- path: (search the full path to a file using key words).
- type: (find files or directories valid values are files or directory ).
- owner: (ad or Linux owner of the file in the form domain name\\userid. NOTE: the double slash is needed i.e. owner:AD01\\usera users).
- group: (group ownership of the file example group:AD01\\domain users).
How to search for directories only
- Use this search to find directories and below a specific path (NOTE: This requires the logged in user to be on the admin list to use the absolute path option shown below)
- In the search box type "type:directory" to include in the search filter. Enter the absolute path in the "File Path" field to constrain the search to this path and below. The results count the number of directories. Downloading results will provide a directory result csv.
- Or use the folders only option in the advanced search field.
How to count the number of files at a path and below
- Add your user id to the admin list (see the configuration guide for the cli command)
- In the Advanced Search drop down, enter the path in using absolute path starting with "/ifs" and enter the starting point of the search.
- Enter no text in the Search box to match all files, the file result count equals the number of files at the path entered and below.
How to search the size field to find files with certain file size ranges
- This search allows a specific field to be searched, and when combined with other search terms allows for very controlled search of data. These examples can be entered into the search bar versus using the advanced UI
- Enter Search: filesize:[10 TO 100] AND extension:pdf (this will find all the pdf files that are 10 - 100 bytes).
- Enter Search: filesize:[100 TO *] AND extension:pdf (this will find all the pdf files that are 100 bytes or greater).
- NOTE: TO must be upper case AND operator must be upper case. File sizes are stored as bytes and will require a GB or MB to byte conversion. Many online calculators can assist with this conversion.
© Superna Inc