Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Merge command

Status
Not open for further replies.

harpal

Technical User
Oct 3, 2001
115
GB
I have loads of PRODUCTS.DATA files sitting in a archive directory all with date extensions what I would like to know is if I have the following below

PRODUCTS.DATA.011012
PRODUCTS.DATA.011013
PRODUCTS.DATA.011014
PRODUCTS.DATA.011015

can I merge these 4 files in one big PRODUCTS.DATA file?

is there a unix command which will allow me to do this.
 
Just do:

cat filename1 filename2 etc > PRODUCTS.DATA

The cat command concatenates (joins) the files in the list and the > outputs them to the new PRODUCTS.DATA file. To append to the PRODUCTS.DATA file if it already exists use >> rather than >

Your original files will still exist after this process, so you can decide what to do with them (ie delete, archive to tape etc).

HTH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top