Created
January 7, 2019 09:01
-
-
Save ginokent/9b81a14d2eaeda3a3cd6f6697a226dc7 to your computer and use it in GitHub Desktop.
[one-liner] td-agent file buffer meta ファイルのみ残存しているものを削除する
This file contains hidden or 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
ls /var/log/td-agent/buffer/ | grep "\.meta$" | sed 's/\.meta$//' | xargs -I@ ls /var/log/td-agent/buffer/@ 2>&1 | grep 'No such file or directory' | sed "s/^[^']*'//; s/'[^']*$/.meta/" | xargs -I@ rm @ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment