Wednesday, 11 November 2009

To delete the contents of a file in VI

To delete the contents of a file in Unix editor vi:
  • When on the first line enter the command: dG
  • Anywhere else in the file: :1,$d

No comments:

Post a Comment