Solved

remove uncompiled c code from folder

Posted on 2012-03-17
4
376 Views
Last Modified: 2012-03-28
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?
0
Comment
Question by:gerrymac1943
4 Comments
 
LVL 37

Assisted Solution

by:Neil Russell
Neil Russell earned 167 total points
ID: 37732647
rm *.c
rm*.h

Is a good starting point. But would be better to just compile your target to a different folder.
0
 
LVL 31

Accepted Solution

by:
farzanj earned 166 total points
ID: 37732657
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
 
LVL 77

Assisted Solution

by:arnold
arnold earned 167 total points
ID: 37733812
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
 

Author Closing Comment

by:gerrymac1943
ID: 37776358
excellent
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Adding more CPU cores to a Linux VM 5 95
Which is more secure: EAP or machine certificate for IKEv2 VPN? 1 86
Linux VM 6 88
linux 13 49
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question