0

I'd like to save the entire terminal text after running a series of commands in Google Cloud Shell similar to the Export Text As... option on MacOS Terminal.

Is the script command my answer or is there a gcloud thing I could use?

Neil C. Obremski
  • 18,696
  • 24
  • 83
  • 112

2 Answers2

1

Cloud Shell runs a debian based OS therefor script command will work.

Once you have the file if you want to download you can get the full path with pwd and then download option on the the points options menu

Soni Sol
  • 2,367
  • 3
  • 12
  • 23
  • I went with `script` which works well but with a caveat that's mentioned on its man page: _all_ output is stored including any control characters like backspace/formfeed. I'd really like something which keeps only the final output because the interim progress bars and so forth really bloat the output. – Neil C. Obremski Jan 23 '20 at 17:12
0

Try put " > name.txt " at the end of command to get what you wanted in directory:

C:\Users\user\AppData\Local\Google\Cloud SDK

mackowi
  • 41
  • 5