Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi is there a easy way to combine all files,say in a directory, into one big file that contains all the information of the files together?i know something like
>>cat file1 file2 file3 .... >> bigfile
might work,but what if the directory has 1000 files in int?i dont want to type every file's name..It's just normal files containing text i want to combine.Thanks
It's not immediately obvious that it'll work until you see that the '*' is expanded by bash to an alphabetical list of the files in the directory. At least that was my feeling when someone pointed it out to me...
Hi,another question on this i have.Please reply if you know the answer.what if i want to store the filename of the small file in the bigfile as well?how can i do this.
For instance say in directory /test there are 2 files test1 and test2.I want to combine them into one big file,but append after each line the filename that the original data was in.Is there an easy enough way to do this??
could some one please help me with code on how to merge two files as belowm, the delimiter could be any thing such as tab, space , coma anything, below is a tab
file1
Quote:
Albert
August
Arnold
file2
Quote:
Bertha
Brad
Bart
bigfile
Quote:
Albert Bertha
August Brad
Arnold Bart
Please don't resurrect old threads with a new question. Furthermore you've posted a new thread here: please see the answers and follow discussion there.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.