티스토리 뷰

 

hadoop fs -ls <hdfsPath>
#hdfsPath 디렉터리 정보 출력

hadoop fs -ls -R <hdfsPath>
#hdfsPath 하위 디렉터리를 포함한 정보 출력

hadoop fs -mkdir <hdfsPath>
#hdfsPath 디렉터리 생성

hadoop fs -mkdir -p <hdfsPath>
#hdfsPath 디렉터리 생성 (미 생성된 상위 부모 디렉터리까지)

hadoop fs -rm <hdfsPath>
#hdfsPath 파일 또는 디렉터리 삭제 (디렉터리는 반드시 비어 있어야)

hadoop fs -rm -r <hdfsPath>
#hdfsPath 파일 또는 디렉터리 삭제 (파일이 존재해도 삭제 주의!)

hadoop fs -mv <hdfsPath> <hdfsPath>
#hdfsPath 파일 또는 디렉터리 이동

hadoop fs -cp <hdfsPath> <hdfsPath>
#hdfsPath 파일 또는 디렉터리 복사

hadoop fs -cp -f <hdfsPath> <hdfsPath>
#hdfsPath 파일 또는 디렉터리 복사 (대상이 존재하면 덮어쓰기)

hadoop fs -put <localPath> <hdfsPath>
#localPath 파일 또는 디렉터리를 목적지 디렉터리(hdfsPath)에 복사 (목적지 디렉터리가 없으면 생성)

hadoop fs -get <hdfsPath> <localPath>
#hdfsPath 파일 또는 디렉터리를 목적지 디렉터리(localPath)에 복사 (목적지 디렉터리가 없으면 생성)

hadoop fs -du <hdfsPath>
#hdfsPath 디렉터리 파일 정보 출력

hadoop fs -du -s <hdfsPath>
#hdfsPath 디렉터리 전체 파일 정보 출력

hadoop fs -du -s -h <hdfsPath>
#hdfsPath 디렉터리 전체 파일 정보 출력 (사람이 읽기 쉬운 형태)

hadoop fs -cat <hdfsPath>
#hdfsPath 파일 내용 출력

hadoop fs -tail <hdfsPath>
#hdfsPath 파일 내용 마지막 내용 출력

hadoop fs -tail -f <hdfsPath>
#hdfsPath 파일 내용 마지막 내용 출력 (파일 내용이 증가함에 따라 출력)

hadoop fs -count <hdfsPath>
#hdfsPath 아래의 디렉터리, 파일, 바이트 수 출력(DIR_COUNT, FILE_COUNT, CONTENT SIZE, FILE_NAME 순서)

hadoop fs -touchz <hdfsPath>
#hdfsPath 0바이트 파일을 생성

hadoop fs -chmod <hdfsPath>
#hdfsPath 디렉터리 또는 파일 권한 변경

hadoop fs -chmod -R <hdfsPath>
#hdfsPath 디렉터리 또는 파일 권한 변경 (하위 디렉터리 까지)

hadoop fs -chown <소유자> <hdfsPath>
#hdfsPath 디렉터리 또는 파일 소유권 변경

hadoop fs -chown -R <소유자> <hdfsPath>
#hdfsPath 디렉터리 또는 파일 소유권 변경 (하위 디렉터리 까지)

 

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
링크
«   2024/05   »
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
글 보관함