Help > Azure > blob >
ls
PreviousNext

  • Overview
  • Syntax
  • Arguments
  • Notes
  • Examples
  • Overview

    List file(s) from cloud storage

    Download ZappyShell

    Syntax

    ls [<NAME_OR_PATTERN>] [--region NAME] [--snap] [--bt] [--kb] [--mb]
               [--gb] [-b|--bare] [-m|--max M] [-p|--page P] [--sort-date]
               [--sort-name] [--sort-size] [--sort-count] [--desc] [-s|--show-size]
               [-t|--show-count] [-a|--calc-size] [--hide-date] [-f|--path]
               [-u|--uri] [-x|--onlyfiles] [-y|--onlyfolders] [-z|--show-all]
               [-o|--out PATH] [--tab] [--fixed] [--csv] [--json] [--xml]
               [--delimiter DELIMITER] [--quote] [--nocons] [--nohdr]
               [--exclude-olderthan INPUT] [--exclude-newerthan INPUT]
               [-r|--recursive] [-c|--continue-onerror] [--auth NAME]
               [--accesskey YOUR_ACCESS_KEY] [--secretkey YOUR_SECRET_KEY]
               [--serviceurl URL] [--threads COUNT] [--consoleout FILEPATH]
               [-v|--verbose] [-w|--wait] [-i|--interactive] 
    
    Alias: list
    

    Arguments

    Parameter Description
    <NAME_OR_PATTERN>
    blob(s) you want to list. Use wild card pattern to list multiple items. e.g. myfile*.txt or myfile_???_*.txt
    --region NAME
    Region where requests should be redirected. If you don't specify region then all requests are first directed to US Standard Region (us-east-1) for name resolution. If you want to create new bucket in a specific region or you want to reduce latency in name resolution then specify this parameter.. Possible values are [us-west-1 | us-west-2 | eu-west-1 | eu-central-1 | ap-southeast-1 | ap-southeast-2 | ap-northeast-1 | sa-east-1]
    --snap
    Include snapshots for listed blob(s)
    --bt
    Show size in bytes
    --kb
    Show size in KB instead of bytes
    --mb
    Show size in MB instead of bytes
    --gb
    Show size in GB instead of bytes
    -b | --bare
    Show minimum information using bare format. Includes only file names
    -m | --max M
    Maximum items to fetch from server.If you don't want to bring huge list back then use this option.
    -p | --page P
    Maximum items to show on the screen before showing next set. By default all items are listed.
    --sort-date
    Sort by last modified date
    --sort-name
    Sort by name
    --sort-size
    Sort by size
    --sort-count
    Sort by object count
    --desc
    Sort in descending order
    -s | --show-size
    Show size attribute
    -t | --show-count
    Show object count for folder/container
    -a | --calc-size
    Calculate folder size
    --hide-date
    Do not show last updated date column
    -f | --path
    Show full path
    -u | --uri
    Show full uri
    -x | --onlyfiles
    Show only files. Do not show folders
    -y | --onlyfolders
    Show only folders. Do not show files
    -z | --show-all
    Show files and folders both (Default)
    -o | --out PATH
    File path where you want to save command output
    --tab
    Generate output in tab delimited format
    --fixed
    Generate output in fixed width format
    --csv
    Generate output in csv format with specified delimiter
    --json
    Generate output in json format
    --xml
    Generate output in XML format
    --delimiter DELIMITER
    Generate output in csv format with specified delimiter
    --quote
    Place double quotes around values
    --nocons
    Don't show output in console
    --nohdr
    Don't show column header
    --exclude-olderthan
    Exclude files if they are older than specified period. You may use format specifier or exact date/datetime. Period format specifiers are d,h,m or s (days, hours, minutes or seconds). Example: 5d = (5 days), 5h=(5 hours), 5m=(5 hours), 5s=5s=(5 second), "2015-12-31 11:59:59"=(exact date+time), "2015-12-31"=(exact date)
    --exclude-newerthan
    Exclude files if they are newer than specified period. You may use format specifier or exact date/datetime. Period format specifiers are d,h,m or s (days, hours, minutes or seconds). Example: 5d = (5 days), 5h=(5 hours), 5m=(5 hours), 5s=5s=(5 second), "2015-12-31 11:59:59"=(exact date+time), "2015-12-31"=(exact date)
    -r | --recursive
    Scan recursive
    -c | --continue-onerror
    Continue on error such as specified file is missing at source
    --auth NAME
    Credential entry name. This entry name must exist (previously saved using setauth command)
    --accesskey YOUR_ACCESS_KEY
    Cloud account access key
    --secretkey YOUR_SECRET_KEY
    Cloud account secret key
    --serviceurl URL
    Service url for cloud service e.g. --serviceurl https://s3-us-west-2.amazonaws.com
    --threads COUNT
    Number of concurrent operations. If you don't specify then system will use default settings to optimize transfer.
    --consoleout FILEPATH
    Captures console output and saves to file
    -v | --verbose
    Log verbosity level. -v means detailed, If you don't specify this option then minimum logging will be done.
    -w | --wait
    Wait for user input before exit
    -i | --interactive
    Continue in interactive mode after this command is completed. This switch is not applicable if you already in interactive mode

    Notes

    Examples

    Examples
    List all blobs stored under container (mycont)

    ls "mycont
    List all blobs stored under folder1

    ls "mycont/folder1/"
    List all blobs stored under folder1 which starts with prefix cust

    ls "mycont/folder1/cust*.*"
    List all blobs and folders stored under folder1 including blob snapshots

    ls "mycont/folder1/" -r --snap



    www.zappysys.com | Products | All copyrights reserved. ZappySys LLC.