79303379

Date: 2024-12-23 14:36:28
Score: 6.5 🚩
Natty:
Report link

Your commands did not work on both Cloudshell and EC2 Linux. Here are outputs

#Cloudshell

[cloudshell-user@ip-10-130-70-166 ~]$ aws rds describe-db-cluster-snapshots --query "DBClusterSnapshots[?SnapshotCreateTime<='$(date -v -30d '+%Y-%m-%d')'].[DBClusterSnapshotIdentifier, DBClusterIdentifier, SnapshotCreateTime, Status, Engine]"

date: invalid option -- 'v'

Try 'date --help' for more information.

[]

[cloudshell-user@ip-10-130-70-166 ~]$ aws rds describe-db-cluster-snapshots --query "DBClusterSnapshots[?SnapshotCreateTime<='$(date -30d '+%Y-%m-%d')'].[DBClusterSnapshotIdentifier, DBClusterIdentifier, SnapshotCreateTime, Status, Engine]"

date: invalid option -- '3'

Try 'date --help' for more information.

#EC2 Linux

[ec2-user@ip-172-31-26-154 ~]$ aws rds describe-db-cluster-snapshots --query "DBClusterSnapshots[?SnapshotCreateTime<='$(date -v -30d '+%Y-%m-%d')'].[DBClusterSnapshotIdentifier, DBClusterIdentifier, SnapshotCreateTime, Status, Engine]"

date: invalid option -- 'v'

Try 'date --help' for more information.

[]

[ec2-user@ip-172-31-26-154 ~]$ aws rds describe-db-cluster-snapshots --query "DBClusterSnapshots[?SnapshotCreateTime<='$(date -30d '+%Y-%m-%d')'].[DBClusterSnapshotIdentifier, DBClusterIdentifier, SnapshotCreateTime, Status, Engine]"

date: invalid option -- '3'

Try 'date --help' for more information.

[]

It does not like -v option. Is there any other option I should try?

Thanks much

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1): did not work
  • Blacklisted phrase (1): Is there any
  • Long answer (-1):
  • No code block (0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Looks like a comment (1):
  • Low reputation (1):
Posted by: user28861672