The UNIX and Linux Forums  

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 2 05-16-2008 07:22 AM
Listing all files in all subdirectories kuciauskas UNIX for Dummies Questions & Answers 3 02-01-2008 01:45 PM
searching files through all subdirectories beneath the current directory milagros Shell Programming and Scripting 5 05-15-2007 01:00 PM
tar subdirectories for specific files ronald_brayan UNIX for Advanced & Expert Users 4 10-12-2006 02:53 AM
copy certain files from subdirectories iomaire Shell Programming and Scripting 3 10-06-2005 07:01 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-08-2003
Registered User
 

Join Date: Sep 2003
Posts: 1
Stumble this Post!
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 12:12 PM.
Forum Sponsor
  #2 (permalink)  
Old 09-08-2003
RTM's Avatar
RTM RTM is offline
Hog Hunter
 
Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
Stumble this Post!
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.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:30 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0