Help for this page

Select Code to Download


  1. or download this
    open FILE,">>filename";
    truncate FILE, 0;
    close FILE
    
  2. or download this
    $ echo abcde > file
    $ perl -e 'truncate "file", 2'
    $ cat file
    ab