GAM Commands

General Information

I am running GAMADV-XTD in the cloud. But use commands from both GAM & GAMADV-XTD as needed, although I am not always sure which is which. Where possible I have tested all of these commands, however take no responsibility for their use.

Always test commands before running them in a production environment.

Creating Files

I use the todrive option to create a file (csv) in the Google Drive of my account. You can replace this >file_name.csv if you are running GAM locally.

Check the version of GAM

gam version

Update Cloud GAMADV-XTD

Run this command to update a Cloud install of GAMADV-XTD

bash <(curl -s -S -L https://git.io/vAAj9) -l

Run this command to update a Cloud install of GAMADV-XTD3

bash <(curl -s -S -L https://git.io/fhZWP) -l

Check if last command ran OK

echo $?

If return is 0 then there were no errors for the last run command. Useful if you run GAM in the cloud and the connection gets reset.

Configuring gam.cfg file

Prevent/Allow the file to open in the browser and/or send an email confirmation.

gam select default config todrive_nobrowser <Boolean> todrive_noemail <Boolean> save verify

File Management

File and folder names are case sensitive.

List Files

ls

Change Directory

cd <folder name>

Go to the parent directory

cd ..

Remove/Delete

rm <File Name>
rmdir <Directory Name>

Rename files

Note, if your file name has certain characters, such as brackets (happens if you upload a file with the same name as one that already exists), then you need to enclose the file name in ''.

mv <original_file_name> <new_file_name>

File Path

In the Cloud you sometimes need to specify the exact file path, rather than the relative path. To find the path of the current location type

pwd