|
3.3) How do I truncate a file? The BSD function ftruncate() sets the length of a file. (But not all versions behave identically.) Other Unix variants all seem to support some version of truncation as well. } else { /* Truncate length. */ fl.l_whence = 0; fl.l_len = 0; fl.l_start = length; fl.l_type = F_WRLCK; /*
|
www.faqs.org/faqs/unix-faq/faq/part3/section-3.html
|
|
|
|
A file can be truncated using two functions. The procedure is: 1. Use Int 21h function 42h, Move File Pointer, to move the file pointer to the position where you want the file to be truncated. 2. Use Int 21h function 40h, Write File or Device, to write zero bytes to the file.
|
www.faqs.org/faqs/assembly-language/x86/general/part1/s...
www.faqs.org/faqs/assembly-language/x86/general/part1/section-7.html
|
|
|
The truncate() function shall cause the regular file named by path to have a size which shall be equal to length bytes. ... truncate - truncate a file to a specified length...
|
www.opengroup.org/onlinepubs/009695399/functions/trunca...
www.opengroup.org/onlinepubs/009695399/functions/truncate.html
|
|
|
A simple Perl script to truncate files. ... trunc.pl is a simple Perl script to truncate files, for example logs and other data files. Many Pikt scripts invoke trunc.pl. trunc.pl sources from the trunc_programs.cfg file.
|
pikt.org/pikt/samples/trunc.pl.html
|
|
|
Thanks for your code for SQL SERVER – Shrinking Truncate Log File – Log Full ... SQL Server 2005 is quite different from SQL Server 2000. To truncate log file is one thing which is different from SQL Server 2000. In SQL Server 2000, you just use Shrink to whatever file size you like. In SQL Server 2005,
|
blog.sqlauthority.com/2006/12/30/sql-server-shrinking-t...
blog.sqlauthority.com/2006/12/30/sql-server-shrinking-truncate-log-file-log-full/
|
|
About a year ago, I wrote SQL SERVER – Shrinking Truncate Log File – Log Full. I was just going through some of the earlier posts and comments on this blog and one particular comment by Praveen Barath caught my eye.
|
blog.sqlauthority.com/2007/11/22/sql-server-shrinking-t...
blog.sqlauthority.com/2007/11/22/sql-server-shrinking-truncate-log-file-log-full-part-2/
|
|
/* Truncate length. */ fl.l_whence = 0; fl.l_len = 0; fl.l_start = length; fl.l_type = F_WRLCK; /* Write lock on file space. */ ; /* This relies on the UNDOCUMENTED F_FREESP argument to fcntl, which truncates the file so that it ends at the position indicated by fl.l_start.
|
www.unixguide.net/unix/faq/3.3.shtml
|
|
SQL Server 2005 is quite different from SQL Server 2000. To truncate log file is one thing which is different from SQL Server 2000. In SQL Server 2000, you just use Shrink to whatever file size you like. In SQL Server 2005, sometime I cannot shrink the log file at all.
|
www.codeproject.com/KB/database/truncate_log_SQL_server...
www.codeproject.com/KB/database/truncate_log_SQL_server.aspx
|
|
This version of MME GEFSYE truncates an existing file, and rewinds it. To execute this MME, the program must have write permission on the file. ... FILE indicates the file to be truncated. If SUBFUNC is 1, FILE will point to a PAT entry. If SUBFUNC is 2, FILE will point to a single word containing a file code, in the format...
|
www.thinkage.ca/english/gcos/expl/mme/gefsye/39.html
|
|