gdrive [global] list [options] List files
gdrive [global] download [options] <fileId> Download file or directory
gdrive [global] download query [options] <query> Download all files and directories matching query
gdrive [global] upload [options] <path> Upload file or directory
gdrive [global] upload - [options] <name> Upload file from stdin
gdrive [global] update [options] <fileId> <path> Update file, this creates a new revision of the file
gdrive [global] info [options] <fileId> Show file info
gdrive [global] mkdir [options] <name> Create directory
gdrive [global] share [options] <fileId> Share file or directory
gdrive [global] share list <fileId> List files permissions
gdrive [global] share revoke <fileId> <permissionId> Revoke permission
gdrive [global] delete [options] <fileId> Delete file or directory
gdrive [global] sync list [options] List all syncable directories on drive
gdrive [global] sync content [options] <fileId> List content of syncable directory
gdrive [global] sync download [options] <fileId> <path> Sync drive directory to local directory
gdrive [global] sync upload [options] <path> <fileId> Sync local directory to drive
gdrive [global] changes [options] List file changes
gdrive [global] revision list [options] <fileId> List file revisions
gdrive [global] revision download [options] <fileId> <revId> Download revision
gdrive [global] revision delete <fileId> <revId> Delete file revision
gdrive [global] import [options] <path> Upload and convert file to a google document, see 'about import' for available conversions
gdrive [global] export [options] <fileId> Export a google document
gdrive [global] about [options] Google drive metadata, quota usage
gdrive [global] about import Show supported import formats
gdrive [global] about export Show supported export formats
gdrive version Print application version
gdrive help Print help
gdrive help <command> Print command help
gdrive help <command> <subcommand> Print subcommand help
Examples
List files
$ gdrive list
Id Name Type Size Created
0B3X9GlR6EmbnZ3gyeGw4d3ozbUk drive-windows-x64.exe bin 6.6 MB 2015-07-18 16:43:58
0B3X9GlR6EmbnTXlSc1FqV1dvSTQ drive-windows-386.exe bin 5.2 MB 2015-07-18 16:43:53
0B3X9GlR6EmbnVjIzMDRqck1aekE drive-osx-x64 bin 6.5 MB 2015-07-18 16:43:50
0B3X9GlR6EmbnbEpXdlhza25zT1U drive-osx-386 bin 5.2 MB 2015-07-18 16:43:41
0B3X9GlR6Embnb095MGxEYmJhY2c drive-linux-x64 bin 6.5 MB 2015-07-18 16:43:38
List largest files
$ gdrive list --query "name contains 'gdrive'" --order "quotaBytesUsed desc" -m 3
Id Name Type Size Created
0B3X9GlR6EmbnZXpDRG1xblM2LTg gdrive-linux-mips64 bin 8.5 MB 2016-02-22 21:07:04
0B3X9GlR6EmbnNW5CTV8xdFkxTjg gdrive-linux-mips64le bin 8.5 MB 2016-02-22 21:07:07
0B3X9GlR6EmbnZ1NGS25FdEVlWEk gdrive-osx-x64 bin 8.3 MB 2016-02-21 20:22:13
Upload file
$ gdrive upload gdrive-osx-x64
Uploading gdrive-osx-x64
Uploaded 0B3X9GlR6EmbnZ1NGS25FdEVlWEk at 3.8 MB/s, total 8.3 MB
Make directory
$ gdrive mkdir gdrive-bin
Directory 0B3X9GlR6EmbnY1RLVTk5VUtOVkk created
Upload file to directory
$ gdrive upload --parent 0B3X9GlR6EmbnY1RLVTk5VUtOVkk gdrive-osx-x64
Uploading gdrive-osx-x64
Uploaded 0B3X9GlR6EmbnNTk0SkV0bm5Hd0E at 2.5 MB/s, total 8.3 MB
Download file
$ gdrive download 0B3X9GlR6EmbnZ1NGS25FdEVlWEk
Downloading gdrive-osx-x64 -> gdrive-osx-x64
Downloaded 0B3X9GlR6EmbnZ1NGS25FdEVlWEk at 8.3 MB/s, total 8.3 MB
Share a file
$ gdrive share 0B3X9GlR6EmbnNTk0SkV0bm5Hd0E
Granted reader permission to anyone
Pipe content directly to google drive
$ echo "Hello World" | gdrive upload - hello.txt
Uploading hello.txt
Uploaded 0B3X9GlR6EmbnaXVrOUpIcWlUS0E at 8.0 B/s, total 12.0 B
Print file to stdout
$ gdrive download --stdout 0B3X9GlR6EmbnaXVrOUpIcWlUS0E
Hello World