Question 3.28: You have a number of text files and you want to join them in......

You have a number of text files and you want to join them into one big file.

Step-by-Step
The 'Blue Check Mark' means that this solution was answered by an expert.
Learn more on how do we answer questions.

Use the cat command to concatenate a number of files into one output file.

For example:

$ cat file1.txt file2.txt file3.txt > full_file.txt

Discussion

Joining files is the real purpose of the cat command. You can supply as many filenames as you like, and they will all be written to the file you direct to. If you do not redirect the output, then it will just appear in your Terminal window. If they are big files, this might take some time!

See Also

See also Recipe 3.7, where cat is used to display the contents of a file.

Related Answered Questions

Question: 3.34

Verified Answer:

Use the Linux df command: $ df -h Filesystem   ...
Question: 3.33

Verified Answer:

Use the Linux date command. The date and time form...
Question: 3.32

Verified Answer:

Edit the file ~/.bashrc using nano (Recipe 3.6), a...
Question: 3.31

Verified Answer:

Run the program or command in the background using...
Question: 3.30

Verified Answer:

Redirect the output to /dev/null using >. For e...
Question: 3.24

Verified Answer:

Use the Task Manager utility, which you’ll find on...
Question: 3.29

Verified Answer:

Use the pipe command, which is the bar symbol (|) ...
Question: 3.27

Verified Answer:

Use the > command to redirect output that would...
Question: 3.26

Verified Answer:

Use the lsusb command. This will list all the devi...
Question: 3.25

Verified Answer:

Depending on the file type, you will need to use t...