티스토리 뷰
AWS S3 ls 명령은 유닉스 스타일의 와일드카드(*, 아스테릭) 사용이 안됩니다. 따라서 include나 exclude 옵션을 이용하여 문제를 해결해야 합니다.
https://docs.aws.amazon.com/cli/latest/reference/s3/
s3 — AWS CLI 1.16.140 Command Reference
This section explains prominent concepts and notations in the set of high-level S3 commands provided. Order of Path Arguments Every command takes one or two positional path arguments. The first path argument represents the source, which is the local file/d
docs.aws.amazon.com
다음과 같이 aws 커맨드가 제공하는 옵션이나 grep 명령을 이용해야 합니다.
aws s3 ls s3://bucket_name/dir --exclude "*" --include "*.txt"
aws s3 ls s3://bucket_name/dir | grep txt
버켓내의 여러 디렉토리에서 이 명령을 이용해야 하는 경우에는 다음과 같이 스크립트를 이용하여 해결할 수 있습니다.
반응형
'AWS' 카테고리의 다른 글
[aws] 아마존 레드쉬프트(Amazon Redshift), EMR과 의 차이 (0) | 2019.07.29 |
---|---|
[AWS-Redshift] [Amazon](500310) Invalid operation: VACUUM is running; 오류 (0) | 2019.07.18 |
[S3] AWS EMR에서 _$folder$가 생성되는 이유 (0) | 2019.04.01 |
[AWS][S3] AWS 커맨드의 The AWS Access Key Id you provided does not exist in our records. 오류 처리 (0) | 2017.03.20 |
[aws][s3] s3의 용량 확인하기 (0) | 2016.11.23 |
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- build
- SQL
- 정올
- airflow
- 하둡
- nodejs
- ubuntu
- SPARK
- 백준
- 오류
- Python
- bash
- 하이브
- java
- 알고리즘
- 파이썬
- Tez
- HDFS
- mysql
- oozie
- Hadoop
- S3
- HIVE
- emr
- Linux
- hbase
- yarn
- 다이나믹
- error
- AWS
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
글 보관함