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

Is command prompt unix?

573


What is .sh file?

611


Can you explain a little bit about command substitution?

598


What does the command '$ls | wc –l > file1' do?

674


What are the general commands in using unix os for a beginner?

575






How to use grep command to list find the records of a file containing 10 different strings?

643


What is the search command in unix?

594


What are reported commands?

560


What is the use of the tee command?

592


How do I run a whois command?

594


Differentiate cat command from more command.

570


What is awk command used for?

596


Who wrote grep?

575


What do chgrp command do?

584


What is the nmap command?

575