gsutil cp -r build/ gs://my-bucket/site/

Category: Google Cloud & Workspace

gsutil cp -r build/ gs://my-bucket/site/

Upload a directory recursively

Copies the entire build/ directory tree, including subfolders, into the site/ prefix of the bucket. Without -r, gsutil skips directories entirely and only uploads top-level files. Folders appear as prefixes in the bucket, not real directories.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.