Google Cloud Storage: How to get list of new files in bucket/folder using gsutil
I have a bucket/folder into which a lot for files are coming in every minutes. How can I read only the new files based on file timestamp. eg: list all files with timestamp > my_timestamp This is not a feature that gsutil or the GCS API provides, as there is no way to list objects by timestamp. Instead, you could subscribe to new objects using the GCS Cloud Pub/Sub feature. You could use some bash-fu: gsutil ls -l gs://your-bucket-name | sort -k2n | tail -n1 | awk 'END {$1=$2=""; sub(/^[ \t]+/, ""); print }' breaking that down: gsutil ls -l gs://your-bucket-name # grab detailed list of objects