Solved

remove uncompiled c code from folder

Posted on 2012-03-17
4
379 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 78

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

759 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