SumiForum
    • Categories
    • Recent
    • Tags
    • Popular
    • Games
      • MFME
      • Virtual Pinball
    • Register
    • Login

    Get last `n` lines of a huge file in Windows using PowerShell

    Scheduled Pinned Locked Moved PowerShell
    1 Posts 1 Posters 95 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • SumisuS Offline
      Sumisu Administrator
      last edited by

      You can use a command like:

      Get-Content InputFile.txt -Tail n > OutputFile.txt
      

      Replace InputFile.txt with the file you want to get the data from. Replace n with the amount of lines you want to extract from the file. Replace the OutputFile.txt with what you would like the file to be named. The file will be placed wherever your current directory is in PowerShell.

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Forum Stats

      0

      Online

      3

      Users

      30

      Topics

      30

      Posts

      Ad

      © 2024 Sumisu

      • Home
      • Categories
      • Popular