The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
list the files but exclude the files in subdirectories shyjuezy UNIX for Dummies Questions & Answers 8 10-15-2008 01:42 PM
Listing all files in all subdirectories kuciauskas UNIX for Dummies Questions & Answers 3 02-01-2008 05:45 PM
searching files through all subdirectories beneath the current directory milagros Shell Programming and Scripting 5 05-15-2007 04:00 PM
tar subdirectories for specific files ronald_brayan UNIX for Advanced & Expert Users 4 10-12-2006 05:53 AM
copy certain files from subdirectories iomaire Shell Programming and Scripting 3 10-06-2005 10:01 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-08-2003
jalvarez jalvarez is offline
Registered User
  
 

Join Date: Sep 2003
Posts: 1
Angry Searching files within subdirectories

I need to concatenate files that are inside a directory and subdirectories. Those files end with .c
Can anyone help me

I am using comand 9find) and (cat) but they don't work together.

Last edited by jalvarez; 09-08-2003 at 03:12 PM..
  #2 (permalink)  
Old 09-08-2003
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
Try something along these lines (assumtion: you want all the output to one file)

$ cd mydir-holding-c-files
$ find ./ -name "*.c" -type f -exec cat {} >> /tmp/all-c-file-info \;
$


Then all the info that is in the different .c files will be in the /tmp directory in whatever you want to call your new file. Post back if this doesn't completely solve what you want to do.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:39 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0