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

How do I clear my terminal history?

588


What is grep in bash?

591


How do you grep a case insensitive?

545


how to sort the content of the file based on numeric values

1257


How do I delete files from command prompt?

555






What do know about tee command?

607


Who invented grep?

657


What does touch command do in unix?

735


Which unix command lists files/folders in alphabetical order?

622


Which command is used to delete all files in the current directory and all its sub-directories?

673


What is the use of find command in unix?

588


Who command in unix operating system?

669


What does 'mkdir' command do in UNIX?

667


What is “chmod” command?

568


Differentiate cat command from more command.

582