Skip to content

Instantly share code, notes, and snippets.

@jwood
Created July 14, 2011 18:11
Show Gist options
  • Select an option

  • Save jwood/1083024 to your computer and use it in GitHub Desktop.

Select an option

Save jwood/1083024 to your computer and use it in GitHub Desktop.
Script to clear out log files in development project directores
#!/bin/bash
dev_dir=/Users/jwood/dev
for d in `ls $dev_dir`; do
test -d $dev_dir/$d/log
if [ $? -eq 0 ]; then
for f in `ls $dev_dir/$d/log/*.log`; do
> $f
done
fi
done
@raykrueger
Copy link
Copy Markdown

Nice, I dig it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment