Finding out about GAM commands

55 views
Skip to first unread message

Temsnr

unread,
Sep 13, 2026, 8:14:28 AM (9 days ago) Sep 13
to GAM for Google Workspace
Gam is great, of course!

I'm not sure if anyone else has mentioned this too, so I'm sorry if I'm stating the blindingly obvious.

One point I've learnt recently is an expedient way of finding out about a GAM command -

If you have GAM7 installed you already have the complete syntax reference on disk, at ~/bin/gam7/GamCommands.txt. Two commands will put any command's full argument list in front of you in a few seconds.

Find the line the command is defined on:

grep -n "print filelist" ~/bin/gam7/GamCommands.txt

Then read the block from there — seventy lines is usually enough to cover one command:

sed -n '7729,7800p' ~/bin/gam7/GamCommands.txt

This told me whether print filelist select <folder>

  • lists everything beneath a folder or only its direct children. 
  • The block shows [(norecursion [<Boolean>])|(depth <Number>)], so it recurses unless you tell it not to
  • It also showed countsonly, which returns the number of items rather than thousands of rows — exactly what I wanted for checking progress on a large move

The advantage over the online documentation is that the file matches the version of GAM you actually have installed, so there is no question of reading syntax for a release you are not running. It is also there when you are working on a machine with no browser to hand.

Have a good day!

Reply all
Reply to author
Forward
0 new messages