Last active
June 2, 2023 12:58
-
-
Save roman-4erkasov/236894e8430a5c6343d8bfa78c99e402 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PID=123 | |
path=/home/user123/file.txt | |
while test -d /proc/$PID; do | |
hdfs dfs -put -f "$path" | |
echo "[$(date '+%Y-%m-%d %H:%M:%S')] synced from $path, waiting for 1h..."; | |
sleep 1h | |
done | |
echo "Sync $path" | |
sleep 1h | |
hdfs dfs -put -f "$path" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment