Skip to content

Instantly share code, notes, and snippets.

@ootput
Created September 29, 2011 02:55
Show Gist options
  • Select an option

  • Save ootput/1249880 to your computer and use it in GitHub Desktop.

Select an option

Save ootput/1249880 to your computer and use it in GitHub Desktop.
Clean FreeBSD Ports' work directories
#!/bin/sh
#
# Search for ports that contain a "work" subdirectory,
# then go into that port directory and perform a
# make clean
for i in `find /usr/ports -name work -type d`
do
cd `echo "$i" | sed 's/\/[^\/]*$/\//'`
make clean
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment