Last active
          October 13, 2022 21:20 
        
      - 
      
 - 
        
Save nazroll/fea293aa582506d7b1e7 to your computer and use it in GitHub Desktop.  
    A shell script example to run "gsutil" as a cronjob
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #! /bin/bash | |
| # Replace "/path/to/gsutil/" with the path of your gsutil installation. | |
| PATH="$PATH":/path/to/gsutil/ | |
| # Replace "/home/username/" with the path of your home directory in Linux/Mac. | |
| # The ".boto" file contains the settings that helps you connect to Google Cloud Storage. | |
| export BOTO_CONFIG="/home/username/.boto" | |
| # A simple gsutil command that returns a list of files/folders in your bucket. | |
| # Replace "yourbucketname" with a bucket name from your Google Cloud Storage. | |
| # You can replace this line with your own gsutil command to upload a file, etc. | |
| gsutil ls -l gs://yourbucketname | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment