How to change the location of ~/.gsutil directory?

Viewed 767

The default location for gsutil directory on linux is $HOME. Is there a way to change it?

I'm aware of $BOTO_CONFIG and $BOTO_PATHwhich serve a different purpose.

1 Answers

This is configurable via the state_dir boto config attribute, under the [GSUtil] section. You can either set this value in your boto file, or you can supply it inline using the -o option, as one of gsutil's Windows test scripts does, e.g.:

gsutil -o "GSUtil:state_dir=/tmp/mydir" cp /tmp/file1 gs://mybucket/
Related