I would like to concatenate a number of text files into one large file in terminal. I know I can do this using the cat command. However, I would like the filename of each fi
First I created each file: echo 'information' > file1.txt for each file[123].txt.
Then I printed each file to makes sure information was correct: tail file?.txt
Then I did this: tail file?.txt >> Mainfile.txt. This created the Mainfile.txt to store the information in each file into a main file.
cat Mainfile.txt confirmed it was okay.
==> file1.txt <== bluemoongoodbeer
==> file2.txt <== awesomepossum
==> file3.txt <== hownowbrowncow
find . -type f -exec cat {} \; -print