Advertisement
Guest User

Untitled

a guest
Jul 28th, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. seq 9 > test.txt
  2. ls -l test.txt
  3. perl -we 'open( FILE, "< ./test.txt" ) && truncate( FILE, 8 ) && close(FILE);'
  4.  
  5. $ ls -lgG test.txt
  6. -rw-rw---- 1 18 2013-08-08 09:49 test.txt
  7.  
  8. perl -we 'open( FILE, "< ./test.txt" ) && truncate( FILE, 8 ) && close(FILE);'
  9.  
  10. perl -we 'open(FILE, "<", "./test.txt") or die "open: $!";
  11. truncate(FILE, 8) or die "truncate: $!";
  12. close(FILE);'
  13.  
  14. truncate --size=1G test.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement