I know that

cat file1 >> file2 

would append the contents of file1 at the end of file2. On the other hand, how can I append the contents of file1 at the beginning of file 2, and not at its end?

Actually, i have a single master file M, and several other files in a directory D. I want to append the contents of file M at the beginning of all the files in the directory D.

Edit
Report