remove uncompiled c code from folder

Hi I want to only leave the c program binaries (compiled code) in a folder.

how do i remove uncompiled code using the command line?
gerrymac1943Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
farzanjConnect With a Mentor Commented:
You could use the find command

find / -type f -name *.c -name *.h

Make the path as conservative as possible.  Once you are able to list, you can pipe the list to
| xargs rm
0
 
Neil RussellConnect With a Mentor Technical Development LeadCommented:
rm *.c
rm*.h

Is a good starting point. But would be better to just compile your target to a different folder.
0
 
arnoldConnect With a Mentor Commented:
You should move the compiled program/s out rather than the source and the compiled objects. Work on the issue with the fewer items.
Usually you want to keep the source in the event you want to make changes in the future.
0
 
gerrymac1943Author Commented:
excellent
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.