title: How do I append a line to the beginning of a very large file in Linux?
body: <p>I have a large text file of ~45 GB, and need to append a line both at the beginning and at the end of the file. What is the quickest way to accomplish this? I don't have access to any big data framework such as Hadoop, etc.</p>
  
  <p>In addition, if I have to also do a string replace in this large file, is there a similar efficient way?</p>
  
  <p>I tried with echo command and it really is taking ages.</p>