How to add content of one file into another file at the beginning

Answer Posted / green

(To insert file2 content to file1; then the command is)
vi file1
(in command mode)
:0 r! cat file2 (press enter)

( file2 content is inserted to file1 )

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does touch command do in unix?

836


Differentiate cmp command from diff command.

677


How is the command '$cat file2 ' different from '$cat >file2 and >> redirection operators ?

848


Differentiate cat command from more command.

663


What is in grep command?

735






What does 'mkdir' command do in UNIX?

762


What is the use of tee command?

650


What is difference between grep and find command in unix?

667


Give the command for finding the current date.

659


What are bash commands?

673


Enumerate some of the most commonly used network commands in unix?

705


What does sed command do in unix?

656


Explain command to show the space allocation of files?

714


What is grep in bash?

667


What do know about tee command?

685