Hi :),
I am not having success in trying to copy (add) several file into one file for editing purposes. Will the cp command do this?
If not what commend will do this?
Thanks :D
RF
Printable View
Hi :),
I am not having success in trying to copy (add) several file into one file for editing purposes. Will the cp command do this?
If not what commend will do this?
Thanks :D
RF
cp won't do it, it will only copy multiple files into a directory. What you can use is cat, and redirect the output to a new file:
Beware that the above command will replace newfile if it already exists. If you want to add the contents of some files to an already existing file, you can do this:Code:cat file1 file2 file3 > newfile
Note the double >> symbol, which appends to the file rather than overwriting it.Code:cat file1 file2 file3 >> existingfile
Thank you, Thank you :D
RF