Concatenate more than 200 files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Concatenate more than 200 files
# 1  
Old 01-16-2012
Concatenate more than 200 files

Hi,

I have a bunch of files (around 500) with the .log extension and each having a different name. Is there an easy way to concatenate them all into a single file?
I've tried:

Code:
cat *.log > complete.log

and it seems that files are overlapping each other...thus the new file is not complete.

thank you
# 2  
Old 01-16-2012
cat wouldn't "overlap" them. It would write them out verbatim, one by one.

If any of them might be changing while cat is running, that would be a problem however.

What exactly is going wrong? What output are you getting versus what output do you want?
# 3  
Old 01-16-2012
Well it seems you guessed correctly, i had a file that was changing because it was still capturing a DSL trace. All fixed now! Smilie Thanks for your quick reply!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Concatenate files and delete source files. Also have to add a comment.

- Concatenate files and delete source files. Also have to add a comment. - I need to concatenate 3 files which have the same characters in the beginning and have to remove those files and add a comment and the end. Example: cat REJ_FILE_ABC.txt REJ_FILE_XYZ.txt REJ_FILE_PQR.txt >... (0 Replies)
Discussion started by: eskay
0 Replies

2. UNIX for Dummies Questions & Answers

Concatenate files

Hi I am trying to learn linux step by step an i am wondering can i use cat command for concatenate files but i want to place context of file1 to a specific position in file2 place of file 2 and not at the end as it dose on default? Thank you. (3 Replies)
Discussion started by: iliya24
3 Replies

3. UNIX for Dummies Questions & Answers

Concatenate Several Files to One

Hi All, Need your help. I will need to concatenate around 100 files but each end of the file I will need to insert my name DIRT1228 on each of the file and before the next file is added and arrived with just one file for all the 100files. Appreciate your time. Dirt (6 Replies)
Discussion started by: dirt1228
6 Replies

4. UNIX for Dummies Questions & Answers

Take 100MB worth files from 200,000 Files

Hi, I have a process which creates almost 200K files. Each file ranging from 1kb to 5kb. This is almost 2GB of data in all files. I have a requirement where the business needs only 100MB worth of files. Is there a way to get files around 100MB (doesn't have to be exactly 100MB) from all the... (2 Replies)
Discussion started by: grep_me
2 Replies

5. Shell Programming and Scripting

Concatenate files

I have a file named "file1" which has the following data 10000 20000 30000 And I have a file named "file2" which has the following data ABC DEF XYZ My output should be 10000ABC 20000DEF (3 Replies)
Discussion started by: bobby1015
3 Replies

6. Shell Programming and Scripting

Delete files having less than 200 lines

Hi All, I have some 30,000 files in one directory. The files look like this: computer networks router wire I want to remove those files which have less than 200 lines for example in the above file, the number of lines is 4. I am trying something like this: find /path/to/dir -type f... (5 Replies)
Discussion started by: shoaibjameel123
5 Replies

7. Shell Programming and Scripting

Concatenate files

Hi, I want to create a batch(bash) file to combine 23 files together. These files have the same extension. I want the final file is save to a given folder. Once it is done it will delete the 23 files. Thanks for help. Need script. (6 Replies)
Discussion started by: zhshqzyc
6 Replies

8. UNIX for Dummies Questions & Answers

Split 200.000 files into different subfolders

Dear UNIX-Community, can help me doing 2 things in Debian 5.0? 1.) Create 100 folders Format: ./0/0, ./0/1, ./0/2, ...,./0/9, ./1/0/, ..., ./9/9 2.) Move over 200.000 files into the subdirectories according to their last digits. 12398123.dat -> ./3/2/12398123.dat 48161.dat ->... (2 Replies)
Discussion started by: diadas
2 Replies

9. Shell Programming and Scripting

Compare 200,000 of rows in two text files

Friends, I have two very large plain text files with pipe delimited as below. Both files are not sorted. Both files have 200,000 of rows. FName|LName|Address|HPhNumber Is perl or shell script feasible for this task? Thanks, Prashant (1 Reply)
Discussion started by: ppat7046
1 Replies
Login or Register to Ask a Question