Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 26 lines (23 sloc) 0.87 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#!/bin/bash -
#===============================================================================
#
# FILE: clean.sh
#
# USAGE: ./clean.sh
#
# DESCRIPTION: clean object, backup and executable files
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: Ming Chen (chenming), chenming@sohu-rd.com
# COMPANY: imeresearch@sogou
# CREATED: 08/21/2010 11:36:00 AM CST
# REVISION: 1.0
#===============================================================================

set -o nounset # Treat unset variables as an error

echo 'moving files to /tmp ...'
find . -regextype 'posix-awk' -iregex '.*(exe|obj|~|o)' -print -exec mv '{}' /tmp \;
find . -mindepth 2 -type f -exec file '{}' \; | grep executable | cut -d ':' -f 1 | xargs -i mv '{}' /tmp
echo 'done'
Something went wrong with that request. Please try again.