123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330 |
- <!DOCTYPE html>
- <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
- <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
-
- <link rel="canonical" href="https://OLC-LOC-Bioinformatics.github.io/AzureStorage/list/">
- <link rel="shortcut icon" href="../img/favicon.ico">
- <title>List - OLC Bioinformatics Azure Storage</title>
- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700" />
- <link rel="stylesheet" href="../css/theme.css" />
- <link rel="stylesheet" href="../css/theme_extra.css" />
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css" />
-
- <script>
- // Current page data
- var mkdocs_page_name = "List";
- var mkdocs_page_input_path = "list.md";
- var mkdocs_page_url = "/AzureStorage/list/";
- </script>
-
- <script src="../js/jquery-2.1.1.min.js" defer></script>
- <script src="../js/modernizr-2.8.3.min.js" defer></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
- <script>hljs.initHighlightingOnLoad();</script>
-
- </head>
- <body class="wy-body-for-nav" role="document">
- <div class="wy-grid-for-nav">
-
- <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
- <div class="wy-side-scroll">
- <div class="wy-side-nav-search">
- <a href=".." class="icon icon-home"> OLC Bioinformatics Azure Storage</a>
- <div role="search">
- <form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
- <input type="text" name="q" placeholder="Search docs" title="Type search term here" />
- </form>
- </div>
- </div>
- <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
- <ul>
- <li class="toctree-l1"><a class="reference internal" href="..">Home</a>
- </li>
- </ul>
- <ul>
- <li class="toctree-l1"><a class="reference internal" href="../install/">Installation</a>
- </li>
- </ul>
- <ul>
- <li class="toctree-l1"><a class="reference internal" href="../credentials/">Credentials</a>
- </li>
- </ul>
- <ul>
- <li class="toctree-l1"><a class="reference internal" href="../upload/">Upload</a>
- </li>
- </ul>
- <ul>
- <li class="toctree-l1"><a class="reference internal" href="../sas_url/">SAS URL</a>
- </li>
- </ul>
- <ul>
- <li class="toctree-l1"><a class="reference internal" href="../move/">Move</a>
- </li>
- </ul>
- <ul>
- <li class="toctree-l1"><a class="reference internal" href="../download/">Download</a>
- </li>
- </ul>
- <ul>
- <li class="toctree-l1"><a class="reference internal" href="../set_tier/">Set Tier</a>
- </li>
- </ul>
- <ul>
- <li class="toctree-l1"><a class="reference internal" href="../delete/">Delete</a>
- </li>
- </ul>
- <ul>
- <li class="toctree-l1"><a class="reference internal" href="../automate/">Automate</a>
- </li>
- </ul>
- <ul class="current">
- <li class="toctree-l1 current"><a class="reference internal current" href="./">List</a>
- <ul class="current">
- <li class="toctree-l2"><a class="reference internal" href="#general-usage">General Usage</a>
- </li>
- <li class="toctree-l2"><a class="reference internal" href="#azurelist-container">AzureList container</a>
- <ul>
- <li class="toctree-l3"><a class="reference internal" href="#azurelist-container-required-arguments">AzureList container required arguments</a>
- </li>
- <li class="toctree-l3"><a class="reference internal" href="#azurelist-container-optional-arguments">AzureList container optional arguments</a>
- </li>
- <li class="toctree-l3"><a class="reference internal" href="#azurelist-container-example-commands">AzureList container example commands</a>
- </li>
- <li class="toctree-l3"><a class="reference internal" href="#azurelist-container-usage">AzureList container usage</a>
- </li>
- </ul>
- </li>
- <li class="toctree-l2"><a class="reference internal" href="#azurelist-search">AzureList search</a>
- <ul>
- <li class="toctree-l3"><a class="reference internal" href="#azurelist-search-required-arguments">AzureList search required arguments</a>
- </li>
- <li class="toctree-l3"><a class="reference internal" href="#azurelist-search-optional-arguments">AzureList search optional arguments</a>
- </li>
- <li class="toctree-l3"><a class="reference internal" href="#azurelist-search-example-commands">AzureList search example commands</a>
- </li>
- <li class="toctree-l3"><a class="reference internal" href="#azurelist-search-usage">AzureList search usage</a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </div>
- </div>
- </nav>
- <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
-
- <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
- <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
- <a href="..">OLC Bioinformatics Azure Storage</a>
- </nav>
-
- <div class="wy-nav-content">
- <div class="rst-content">
- <div role="navigation" aria-label="breadcrumbs navigation">
- <ul class="wy-breadcrumbs">
- <li><a href="..">Docs</a> »</li>
-
-
-
- <li>List</li>
- <li class="wy-breadcrumbs-aside">
-
- <a href="https://github.com/OLC-LOC-Bioinformatics/AzureStorage/edit/main/docs/list.md"
- class="icon icon-github"> Edit on GitHub</a>
-
- </li>
- </ul>
-
- <hr/>
- </div>
- <div role="main">
- <div class="section">
-
- <h2 id="azurelist">AzureList</h2>
- <p>List and optionally filter containers and/or files in your Azure storage account</p>
- <p>Choose either the <a href="#azurelist-container"><code>container</code></a>, or the <a href="#azurelist-search"><code>search</code></a> functionality</p>
- <p>This script allows you to filter using regular expressions, so make sure you <a href="https://docs.python.org/3/howto/regex.html">know what you're doing</a>, <a href="https://docs.python.org/3/howto/regex.html">check out a tutorial</a>, <a href="https://www.dataquest.io/blog/regex-cheatsheet/">look at a cheatsheet</a>, and/or <a href="https://pythex.org/">test your expressions</a></p>
- <p><strong>Important:</strong> since the regular expressions are being entered on the command line, you will need to escape certain characters e.g. ! should be !</p>
- <h4 id="general-usage">General Usage</h4>
- <pre><code>usage: AzureList [-h] {container,search} ...
- Explore your Azure storage account
- optional arguments:
- -h, --help show this help message and exit
- Available functionality:
- {container,search}
- container Filter and list containers in your Azure storage account
- search Search files in a container (or containers) in Azure storage
- </code></pre>
- <h3 id="azurelist-container">AzureList container</h3>
- <p>List and optionally filter containers in your Azure storage account</p>
- <h4 id="azurelist-container-required-arguments">AzureList container required arguments</h4>
- <ul>
- <li>account name</li>
- </ul>
- <h4 id="azurelist-container-optional-arguments">AzureList container optional arguments</h4>
- <ul>
- <li>expression: expression to use to filter the containers. Regular expressions are supported. Note that since the regular expression is being entered on the command line, you may need to escape certain characters e.g. ! should be \!</li>
- <li>output_file: name and path of file in which the outputs are to be saved.</li>
- <li>passphrase used to store your connection string in the system keyring (default is AzureStorage)</li>
- <li>verbosity: set the logging level. Options are debug,info,warning,error,critical. Default is info</li>
- </ul>
- <h4 id="azurelist-container-example-commands">AzureList container example commands</h4>
- <p>These commands will use <code>account_name</code> as the name of the storage account</p>
- <p>To list all containers in your Azure storage account</p>
- <p><code>AzureList container -a account_name</code></p>
- <p>To confirm the container <code>191216-dar</code> is present in your account</p>
- <p><code>AzureList container -a account_name 191216-dar</code></p>
- <p>To filter the list of containers to those starting with <code>19</code></p>
- <p><code>AzureList container -a account_name 19*</code></p>
- <p>To filter the list of container to those starting with <code>19</code> and four additional digits followed by a dash</p>
- <p><code>AzureList container -a account_name 19d{4}-*</code></p>
- <p>To filter the list of containers to those starting with six digits, a dash, and three digits</p>
- <p><code>AzureList container -a account_name \\d{6}-\\D{3}</code></p>
- <p>To filter the list of containers to those ending with <code>outputs</code></p>
- <p><code>AzureList container -a account_name *outputs\$</code></p>
- <p>To filter the list of containers to those that start with <code>19</code> and four additional digits, followed by a dash, three letters, and does not contain the word <code>outputs</code></p>
- <p><code>AzureList container -a account_name 1912\\d{2}-\\D{3}\(\?\!*output\)</code></p>
- <h4 id="azurelist-container-usage">AzureList container usage</h4>
- <pre><code>usage: AzureList container [-h] -a ACCOUNT_NAME [-p PASSPHRASE] [-v VERBOSITY] [-o OUTPUT_FILE]
- [expression]
- Filter and list containers in your Azure storage account
- positional arguments:
- expression Expression to search. This command supports regular expressions. e.g. 1912* will return all containers starting with 1912, including 191216-dar Note that since the regular expression is being entered on the command line, you may need to escape certain characters e.g. ! should be \!
- optional arguments:
- -h, --help show this help message and exit
- -a ACCOUNT_NAME, --account_name ACCOUNT_NAME
- Name of the Azure storage account
- -p PASSPHRASE, --passphrase PASSPHRASE
- The passphrase to use when encrypting the azure storage-specific connection string to the system keyring. Default is "AzureStorage".
- -v VERBOSITY, --verbosity VERBOSITY
- Set the logging level. Options are debug, info, warning, error, and critical. Default is info.
- -o OUTPUT_FILE, --output_file OUTPUT_FILE
- Optionally provide the name and path of file in which the outputs are to be saved.
- </code></pre>
- <h3 id="azurelist-search">AzureList search</h3>
- <p>Filter files in a container (or containers) in Azure storage</p>
- <h4 id="azurelist-search-required-arguments">AzureList search required arguments</h4>
- <ul>
- <li>account name</li>
- </ul>
- <h4 id="azurelist-search-optional-arguments">AzureList search optional arguments</h4>
- <ul>
- <li>container_name: name of the Azure storage container. Regular expressions are supported. Note that since the regular expression is being entered on the command line, you may need to escape certain characters e.g. ! should be \!</li>
- <li>expression: expression to use to filter the containers. Regular expressions are supported. Note that since the regular expression is being entered on the command line, you may need to escape certain characters e.g. ! should be \!</li>
- <li>output_file: name and path of file in which the outputs are to be saved.</li>
- <li>passphrase used to store your connection string in the system keyring (default is AzureStorage)</li>
- <li>verbosity: set the logging level. Options are debug,info,warning,error,critical. Default is info</li>
- </ul>
- <h4 id="azurelist-search-example-commands">AzureList search example commands</h4>
- <p>These commands will use <code>account_name</code> as the name of the storage account. Note that all the regex examples used in <a href="#azurelist-container-example-commands"><code>AzureList container</code></a> can be used here</p>
- <p>To list all files in all containers in your storage account</p>
- <p><code>AzureList search -a account_name</code></p>
- <p>To list all files in all containers ending with <code>.gz</code></p>
- <p><code>AzureList search -a account_name \*.gz</code></p>
- <p>To list all files in the container <code>container-name</code></p>
- <p><code>AzureList search -a account_name -c container_name</code></p>
- <p>To list all files in the container <code>container-name</code> starting with <code>reports</code></p>
- <p><code>AzureList search -a account_name -c container_name reports*</code></p>
- <p>To list all files in the container <code>container-name</code> ending with <code>.gz</code></p>
- <p><code>AzureList search -a account_name -c container-name \*.gz</code></p>
- <p>To list all files in the container <code>container-name</code> that contain <code>.gz</code> </p>
- <p><code>AzureList search -a account_name -c container-name \*.gz*</code></p>
- <p>To list all files in the container <code>container-name</code> that contain <code>.gz</code> (but not at the end)</p>
- <p><code>AzureList search -a account_name -c container-name \*.gz.+</code></p>
- <h4 id="azurelist-search-usage">AzureList search usage</h4>
- <pre><code>usage: AzureList search [-h] -a ACCOUNT_NAME [-p PASSPHRASE] [-v VERBOSITY] [-o OUTPUT_FILE]
- [-c [CONTAINER_NAME]]
- [expression]
- Filter files in a container (or containers) in Azure storage
- positional arguments:
- expression Expression to search. This command supports regular expressions. e.g. 1912* will return all containers starting with 1912, including 191216-dar Note that since the regular expression is being entered on the command line, you may need to escape certain characters e.g. ! should be \!
- optional arguments:
- -h, --help show this help message and exit
- -a ACCOUNT_NAME, --account_name ACCOUNT_NAME
- Name of the Azure storage account
- -p PASSPHRASE, --passphrase PASSPHRASE
- The passphrase to use when encrypting the azure storage-specific connection string to the system keyring. Default is "AzureStorage".
- -v VERBOSITY, --verbosity VERBOSITY
- Set the logging level. Options are debug, info, warning, error, and critical. Default is info.
- -o OUTPUT_FILE, --output_file OUTPUT_FILE
- Optionally provide the name and path of file in which the outputs are to be saved.
- -c [CONTAINER_NAME], --container_name [CONTAINER_NAME]
- Name of the Azure storage container. This command supports regular expressions e.g. 1912* will return all containers starting with 1912.Note that since the regular expression is being entered on the command line, you may need to escape certain characters e.g. ! should be \! You can make your queries as complex as you wish: 1912\d{2}-\D{3}\(\?\!*output\) will only return containers that start with 1912, and have two additional digits. If the word output is present, any matches are ignored. There also have to be exactly three letters following a dash and the first six numbers e.g. 191216-dar and 191227-dar will be returned but not 191216-dar-outputs 191202-test, 191216dar, 1912162-dar, 191203-m05722, 191114-gta, or 200105-dar (and many others)
- </code></pre>
-
- </div>
- </div>
- <footer>
-
- <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
-
-
- <a href="../automate/" class="btn btn-neutral" title="Automate"><span class="icon icon-circle-arrow-left"></span> Previous</a>
-
- </div>
-
- <hr/>
- <div role="contentinfo">
- <!-- Copyright etc -->
-
- </div>
- Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
- </footer>
-
- </div>
- </div>
- </section>
- </div>
- <div class="rst-versions" role="note" aria-label="versions">
- <span class="rst-current-version" data-toggle="rst-current-version">
-
- <a href="https://github.com/OLC-LOC-Bioinformatics/AzureStorage/" class="fa fa-github" style="float: left; color: #fcfcfc"> GitHub</a>
-
-
- <span><a href="../automate/" style="color: #fcfcfc;">« Previous</a></span>
-
-
- </span>
- </div>
- <script>var base_url = '..';</script>
- <script src="../js/theme.js" defer></script>
- <script src="../search/main.js" defer></script>
- <script defer>
- window.onload = function () {
- SphinxRtdTheme.Navigation.enable(true);
- };
- </script>
- </body>
- </html>
|