Wednesday, April 4, 2012

Copy content of one file to another file

Using "CAT" shell command we can copy content of one file to other file.

cat file1 >> file2

Note: Double redirect (>>) appends the contents of file1 to file2.
         Single redirect ( > ) overwrites the contents of file2 with the 
         contents of file1.

8 comments:

  1. permission denied, even with sudo, permissions for folder are rwx rwx rwx

    ReplyDelete
  2. Thank you this command is very useful.

    ReplyDelete
  3. Hai here i want to copy set of lines from one file another file in linux..how it be?

    ReplyDelete
  4. Thanks for providing this informative information you may also refer.
    http://www.s4techno.com/blog/2016/07/12/fix-grub-issue-of-dual-boot-between-linux-and-windows/

    ReplyDelete