Skip to content

Instantly share code, notes, and snippets.

@MyounghoonKim
Created April 24, 2018 09:58
Show Gist options
  • Save MyounghoonKim/a9683c6eedcb8af9c763d65ba32d07cc to your computer and use it in GitHub Desktop.
Save MyounghoonKim/a9683c6eedcb8af9c763d65ba32d07cc to your computer and use it in GitHub Desktop.
monitor emr hadoop steps log
#!/bin/bash
target="/var/log/hadoop/steps"
while true
do
touch $target/lastwatch
sleep 1
find -cnewer $target/lastwatch -exec tail -1 {} \;
done
# based on https://unix.stackexchange.com/questions/24952/script-to-monitor-folder-for-new-files/249238#249238
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment