简体   繁体   中英

Viewing command history in Google Cloud shell

I am trying to view some commands I used several months ago for a course project. I used the history command but it only showed very recent lines. Is there a way to view older command history? thanks!

Your list of executed commands is stored in .bash_history . You can find this file in the home folder of Cloud Shell.

Cloud Shell's home folder is deleted after 120 days of inactivity. So, if you're looking for commands that you used several months ago and your Cloud Shell was inactive for more than 120 days, chances are that your disk was deleted.

Also, by default, bash stores the last 500 executed commands history.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM