Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- seq 9 > test.txt
- ls -l test.txt
- perl -we 'open( FILE, "< ./test.txt" ) && truncate( FILE, 8 ) && close(FILE);'
- $ ls -lgG test.txt
- -rw-rw---- 1 18 2013-08-08 09:49 test.txt
- perl -we 'open( FILE, "< ./test.txt" ) && truncate( FILE, 8 ) && close(FILE);'
- perl -we 'open(FILE, "<", "./test.txt") or die "open: $!";
- truncate(FILE, 8) or die "truncate: $!";
- close(FILE);'
- truncate --size=1G test.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement