Skip to Content

Truncate file to a specific size

Dec 28, 2017 at 04:09 PM


avatar image
Former Member

This is what i am trying to do:

exec( 'sh','truncate -s 20000 /path_to_file/filename.txt',8);

How can i truncate a file to a specific size at a specific remote directory that is accessible by Job Server?

Or something that would allow me to cut the file to remove rows of data from the file like "cut -c -20000 filename.txt"?


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers