Skip to content

Instantly share code, notes, and snippets.

@sudogem
Created July 18, 2020 08:45
Show Gist options
  • Save sudogem/c3e9d901f22d4c759092dde0a7e937e6 to your computer and use it in GitHub Desktop.
Save sudogem/c3e9d901f22d4c759092dde0a7e937e6 to your computer and use it in GitHub Desktop.
clrlogs - empty log files in log/ folder
## In your clrlogs.sh file, add this code
## create a symlink to /usr/local/bin
# <app-root> / log
# check if log folder is exist.
if [ -d "log" ]
then
echo "[clrlogs.sh] log folder found!"
for file in log/*.log
do
echo "" > $file
done
else
echo "[clrlogs.sh] log folder does not exist."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment