cat file1 file2 filen > outputfile
or if you want to concatenate all text files in directory:
or you can use >> operator to append to file:cat *.txt > outputfile
cat file1 >> file2
cat file1 file2 filen > outputfile
or you can use >> operator to append to file:cat *.txt > outputfile
cat file1 >> file2
wc -w <file>example for file 2600.txt (War and Peace from Leo Tolstoy) from Guttenberg Project :
wc -w 2600.txtoutput:
566321 2600.txtIf you want to count lines in some text file you could use:
wc -l <file>the same file for example
wc -l 2600.txtoutput:
65008 2600.txt