This may not be efficient or bulletproof, but I needed to resize a log file, and didn't want to create a temp file that would be renamed after the resize. The code below is a log file class that implements caching (simple), and the resize stuff is at the end.
The general idea is that we specify a maximum size and a resize factor. Once the log file exceeds the maximum size, we apply the resize factor (0.5 in the code below, or half of the maximum size) and resize the log file to the maximum size * resize factor. We write the contents from the end of the file at the beginning, then change the length of the file.
In detail, the log file is opened as a read/write FileStream, and then a StreamWriter is opened on that FileStream. The FileSteam position is set to the first character in the target resized file, and a StreamReader is opened. It is important to note that the internal buffer for the StreamReader is set to the same size as the buffer (Char array) we will use to read and write characters. The StreamReader doesn't use the position of the underlying FileStream until the internal buffer is exhausted. That is, any Read method of the StreamReader seems to read a full buffer's worth of data, even if you are just reading one character. If you subsequently set the position in the underlying FileStream, the rest of the internal buffer is used, and then the StreamReader starts reading at the new position. If the internal buffer of the StreamReader is smaller than the block of characters you read out, when you set the position, the StreamReader will read until the internal buffer is full, and then start reading back at the original position that you had set. So you end up with duplicate data.
We read the rest of the first line so we don't end up with line fragments at the beginning of the file. We then dump any buffered characters from the StreamReader, so we don't have any problems repositioning the FileStream and getting incorrect data from the Read method. Then we simply read a block of data from the StreamReader, reposition the FileStream and write the characters out to the StreamWriter. The last thing we do is set the length of the file to the amount of bytes that were read. There may be an issue with multi-byte character sets, but I didn't have time to accommodate them.
Imports System.IO
Imports System.Text

Public Class AC_Log
    Private Const maxbuffersize As Integer = 2 ^ 15
    Private Const resizefactor As Decimal = 0.5
    Private defaultlogpath As String = Application.StartupPath
    Private _cache As StringBuilder
    Private _logfilename As String = ""
    Private _logpath As String
    Private _libname As String = ""
    Private _maxlogfilesize As Long = 200 'KB
    Private gDefaultLogFileSuffix As String = ".log"

    Public Property LibraryName() As String
        Get
            Return _libname
        End Get
        Set(ByVal Value As String)
            If IsNothing(Value) Then
                _libname = ""
            Else
                _libname = Value.Trim
            End If
        End Set
    End Property

    Public Property LogPath() As String
        Get
            Return _logpath
        End Get
        Set(ByVal Value As String)
            _logpath = Value
        End Set
    End Property

    Public Property LogFileName() As String
        Get
            Return _logfilename
        End Get
        Set(ByVal Value As String)
            _logfilename = Value
        End Set
    End Property

    Public Sub New(ByVal NewLogPath As String)
        If NewLogPath.Trim.Length = 0 Then
            _logpath = defaultlogpath
        Else
            _logpath = NewLogPath
        End If
    End Sub

    'non cached writer, also called by FlushCache
    Public Sub WriteEntry(ByVal entry As String)
        Dim logwriter As StreamWriter
        Dim tmplogname As String
        Dim logfullpath As String
        Try
            logfullpath = ManageLogFile()
            If IsNothing(logfullpath) OrElse logfullpath.Trim.Length = 0 Then
                Exit Sub
            End If
            If File.Exists(logfullpath) Then
                logwriter = File.AppendText(logfullpath)
            Else
                logwriter = File.CreateText(logfullpath)
            End If
            logwriter.Write(entry)
        Catch ex As Exception
        Finally
            If Not IsNothing(logwriter) Then
                logwriter.Close()
            End If
        End Try
    End Sub

    'cached write
    Public Sub WriteEntryToCache(ByVal entry As String, Optional ByVal borders As Boolean = False)
        If IsNothing(_cache) Then
            _cache = New StringBuilder
        End If
        If _cache.Length + entry.Length > maxbuffersize _
                OrElse _cache.Length + entry.Length > (_maxlogfilesize * (2 ^ 10)) Then
            FlushCache()
        End If
        If borders Then
            _cache.Append("-"c, 100).Append(vbCrLf)
        End If
        _cache.Append(Now.ToString("yyyy/MM/dd hh:mm:ss") & ": " & entry & vbCrLf)
        If borders Then
            _cache.Append("-"c, 100).Append(vbCrLf)
        End If
    End Sub

    Public Sub FlushCache()
        If Not IsNothing(_cache) AndAlso _cache.Length > 0 Then
            WriteEntry(_cache.ToString)
            _cache.Length = 0
        End If
    End Sub

    Private Function ManageLogFile() As String
        Dim filog As FileInfo
        Dim tempfilename As String
        Dim logs() As String
        Dim logpath As String

        Try
            If Not Directory.Exists(_logpath) Then
                _logpath = defaultlogpath
            End If
            If _logfilename.Trim.Length = 0 Then
                _logfilename = IIf(_libname = "", "temp_log", _libname)
            End If
            tempfilename = Path.Combine(_logpath, _logfilename & gDefaultLogFileSuffix)
            If File.Exists(tempfilename) Then
                filog = New FileInfo(tempfilename)
                If filog.Length > (_maxlogfilesize * (2 ^ 10)) Then
                    ResizeLogFile(tempfilename, (_maxlogfilesize * (2 ^ 10)) * resizefactor)
                End If
            End If
            Return tempfilename
        Catch ex As Exception
            Return Nothing
        End Try
    End Function

    Private Function ResizeLogFile(ByVal logfullpath As String, ByVal newsize As Long) As Boolean
        Dim fslog As FileStream
        Dim swrite As StreamWriter
        Dim sread As StreamReader
        Dim charsread As Integer = 0
        Dim totalbytesread As Long = 0
        Dim startat As Long
        Dim chars(maxbuffersize) As Char
        Dim charread As Integer

        If IsNothing(logfullpath) OrElse Not File.Exists(logfullpath) Then
            Return False
        End If

        Try
            fslog = File.Open(logfullpath, FileMode.Open, FileAccess.ReadWrite)
            swrite = New StreamWriter(fslog)
            'set initial position for reading
            fslog.Position = fslog.Length - newsize
            startat = fslog.Position
            sread = New StreamReader(fslog, Encoding.UTF8, False, maxbuffersize)
            'go to end of first line so we don't have fragments in log file
            startat += sread.ReadLine().Length + 2
            sread.DiscardBufferedData()
            'in loop, read bytes in chunks from startat to end, write them at beginning
            Do
                fslog.Position = startat + totalbytesread
                charsread = sread.Read(chars, 0, maxbuffersize)
                If charsread = 0 Then
                    Exit Do
                End If
                fslog.Position = totalbytesread
                swrite.Write(chars, 0, charsread)
                swrite.Flush()
                totalbytesread += sread.CurrentEncoding.GetByteCount(chars, 0, charsread)
            Loop
            'truncate the file to the proper length
            fslog.SetLength(totalbytesread)
            Return True
        Catch ex As Exception
        Finally
            If Not IsNothing(sread) Then
                sread.Close()
            End If
            If Not IsNothing(fslog) Then
                fslog.Close()
            End If
        End Try
    End Function
End Class