The
gsutil
utility lets you create, access, and modify buckets and objects. For the most part, gsutil commands have the same names and purposes as common <sup>*</sup>nix
commands.This table lists 13 of gsutil
's commands. For a more thorough discussion, visit Google's documentation.
gsutil Commands
Command | Description |
mb [-c class] [-l location] |
Make a new bucket |
rb [-f] url… |
Remove buckets |
cp [OPTION]… src_url dst_url |
Copy files and objects |
mv [-p] src_url dst_url |
Move objects and/or subdirectories |
rm [-f] [-r] url… |
Remove objects |
ls [-a] [-b] [-d] [-l] [-L] [-r] [-p proj_id] url… |
List buckets and objects |
stat url… |
Display object status |
rewrite -k [-f] [-r] url… |
Rewrite objects |
du url… |
Display object size usage |
cat [-h] url… |
Concatenate object to standard output |
compose gs://bucket/obj1 |
Concatenate multiple objects into one |
[-D] config [-a] [-b] [-e] [-f] [-n] |
Obtain credentials and create a configuration file |
web set [-m main_page_suffix] |
Associate one or more buckets with a web page |