OXIESEC PANEL
- Current Dir:
/
/
opt
/
gsutil
/
gslib
/
commands
/
__pycache__
Server IP: 2a02:4780:11:1594:0:ef5:22d7:a
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/11/2025 08:19:49 AM
rwxr-xr-x
📄
__init__.cpython-39.pyc
323 bytes
02/11/2025 08:19:49 AM
rw-r--r--
📄
acl.cpython-39.pyc
18.76 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
autoclass.cpython-39.pyc
6.01 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
bucketpolicyonly.cpython-39.pyc
6.75 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
cat.cpython-39.pyc
4.17 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
compose.cpython-39.pyc
4.57 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
config.cpython-39.pyc
40.97 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
cors.cpython-39.pyc
6.56 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
cp.cpython-39.pyc
42.21 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
defacl.cpython-39.pyc
11.25 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
defstorageclass.cpython-39.pyc
5.78 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
du.cpython-39.pyc
8.47 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
hash.cpython-39.pyc
7.87 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
help.cpython-39.pyc
6.41 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
hmac.cpython-39.pyc
12.39 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
iam.cpython-39.pyc
24.6 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
kms.cpython-39.pyc
14.88 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
label.cpython-39.pyc
10.46 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
lifecycle.cpython-39.pyc
6.37 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
logging.cpython-39.pyc
9.04 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
ls.cpython-39.pyc
18.81 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
mb.cpython-39.pyc
12.23 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
mv.cpython-39.pyc
5.06 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
notification.cpython-39.pyc
25.47 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
pap.cpython-39.pyc
6.53 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
perfdiag.cpython-39.pyc
62.18 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
rb.cpython-39.pyc
3.78 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
requesterpays.cpython-39.pyc
5.53 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
retention.cpython-39.pyc
20.02 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
rewrite.cpython-39.pyc
16.12 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
rm.cpython-39.pyc
10.86 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
rpo.cpython-39.pyc
5.96 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
rsync.cpython-39.pyc
53.86 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
setmeta.cpython-39.pyc
11.25 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
signurl.cpython-39.pyc
20.99 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
stat.cpython-39.pyc
5.04 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
test.cpython-39.pyc
17.73 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
ubla.cpython-39.pyc
6.96 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
update.cpython-39.pyc
12.26 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
version.cpython-39.pyc
5.25 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
versioning.cpython-39.pyc
5.51 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
web.cpython-39.pyc
7.63 KB
02/11/2025 08:19:49 AM
rw-r--r--
Editing: du.cpython-39.pyc
Close
a +(Wg�) � @ s0 d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlZddlZddlZddl m Z ddlmZ dd l mZ dd lmZ ddlmZ ddlmZ dd lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddl!m"Z" ddlm#Z# dZ$de$ d Z%G dd� de�Z&dS )zCImplementation of Unix-like du command for cloud storage providers.� )�absolute_import)�print_function)�division)�unicode_literalsN)�BucketListingObject)�Command)�CommandArgument)�ApiSelector)�CommandException)�ContainsWildcard)�StorageUrlFromString)� ls_helper)�NO_MAX)�S3_DELETE_MARKER_GUID)�UTF8)�GcloudStorageFlag)�GcloudStorageMap)�print_to_fd)�MakeHumanReadable)� text_utilz gsutil du url... z <B>SYNOPSIS</B> ak <B>DESCRIPTION</B> The du command displays the amount of space in bytes used up by the objects in a bucket, subdirectory, or project. The syntax emulates the Linux ``du -b`` command, which reports the disk usage of files and subdirectories. For example, the following command reports the total space used by all objects and subdirectories under gs://your-bucket/dir: gsutil du -s -a gs://your-bucket/dir <B>OPTIONS</B> -0 Ends each output line with a 0 byte rather than a newline. You can use this to make the output machine-readable. -a Includes both live and noncurrent object versions. Also prints the generation and metageneration number for each listed object. If this flag is not specified, only live object versions are included. -c Includes a total size at the end of the output. -e Exclude a pattern from the report. Example: -e "*.o" excludes any object that ends in ".o". Can be specified multiple times. -h Prints object sizes in human-readable format. For example, ``1 KiB``, ``234 MiB``, or ``2GiB``. -s Displays only the total size for each argument, omitting the list of individual objects. -X Similar to ``-e``, but excludes patterns from the given file. The patterns to exclude should be listed one per line. <B>EXAMPLES</B> To list the size of each object in a bucket: gsutil du gs://bucketname To list the size of each object in the ``prefix`` subdirectory: gsutil du gs://bucketname/prefix/* To include the total number of bytes in human-readable form: gsutil du -ch gs://bucketname To see only the summary of the total number of (live) bytes in two given buckets: gsutil du -s gs://bucket1 gs://bucket2 To list the size of each object in a bucket with `Object Versioning <https://cloud.google.com/storage/docs/object-versioning>`_ enabled, including noncurrent objects: gsutil du -a gs://bucketname To list the size of each object in a bucket, except objects that end in ".bak", with each object printed ending in a null byte: gsutil du -e "*.bak" -0 gs://bucketname To list the size of each bucket in a project and the total size of the project: gsutil -o GSUtil:default_project_id=project-name du -shc c @ s� e Zd ZdZejdg ededdddej ej gej e�� gd�Z ejdg dd ei d �Zeddged�ed �ed�ed�ed�ed�ed�d�d�Zdd� Zdd� Zdd� ZdS )� DuCommandz$Implementation of gsutil du command.Zdur z 0ace:hsX:FT)�command_name_aliases�usage_synopsis�min_args�max_args�supported_sub_args�file_url_ok�provider_url_ok�urls_start_arg�gs_api_support�gs_default_api�argparse_arguments�command_helpzDisplay object size usage)� help_name�help_name_aliases� help_type�help_one_line_summary� help_text�subcommand_help_text�storagez--zero-terminatorz--all-versionsz--totalz--exclude-name-patternz--readable-sizesz--summarizez--exclude-name-pattern-file)�-0�-a�-c�-e�-h�-s�-X)�gcloud_command�flag_mapc C s<