Solved

remove uncompiled c code from folder

Posted on 2012-03-17
4
389 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 79

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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will giveā€¦
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

628 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