forked from Testudinate/Hadoop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
2.2.6.txt
13 lines (9 loc) · 1.05 KB
/
2.2.6.txt
1
2
3
4
5
6
7
8
9
10
11
12
На сервере работает скрипт, который раз в сутки загружает файл с логом за прошедшие сутки
(например, 2015-01-01.log) в HDFS. Работает он следующим образом:
Локальный файл с логом (2015-01-01.log) копируется в HDFS в папку /tmp/logs/
Создается папка для нужной даты в /data/logs/ (например, /data/logs/2015-01-01/)
Из временной папки /tmp/logs/ нужный файл с логом перемещается в папку /data/logs/{date}
Удаляется папка с логом месячной давности (например, /data/logs/2014-12-01/)
Напишите через запятую последовательность команд (если нужно с опциями) shell-клиента
для выполнения описанных действий (например: -ls, -mkdir, -du -h, -tail)
Ответ : -put, -mkdir, -mv, rm -r