Search code examples
linuxgoogle-cloud-platformcommandstoragegsutil

How to download files which are created in last 24 hours using gsutil in GCP console?


I have a directory in a gcp storage bucket. And there are 2 subdirectories in that bucket.

Is there a way to download files which are created in last 24 hours in those subdirectories using gsutil command from console?


Solution

  • I was able to achieve part of it using gcp console and shell.

    Steps:

    1. Go to storage directory in browser gcp console.
    2. Click on filter and you'll get options to filter based on created before, created after etc.
    3. Provide the date and apply filter
    4. Click on Download button
    5. Copy the command, Open the gcp shell and run it. The required files will be downloaded there.
    6. Run the zip command in shell and archive the downloaded files.
    7. Select the Download from shell options and provide file path to download.