Fork me on GitHub
#emacs
<
2017-05-25
>
jjttjj18:05:13

I have a big log text file from a linux server that I now have on a windows computer with emacs. I can manipulate the file fine with clojure with line-seq, etc, but it's too big to work with. So I found some powershell incantation to extract the last n lines of a file and output it into a new file, but now when I attempt to work with it in emacs Im getting ^@ symbols between each character. Seems like some sort of encoding issue. Anyone know how I might be able to fix this?

tanzoniteblack18:05:55

@jjttjj you’re only using the powershell thing because the file is too large to view in emacs? Or because you’re having problems manipulating it with clojure?

jjttjj18:05:59

yeah basically I only need to work with the last X,000 lines. but it's 700mb of text so trying take-last on the line-seq isn't working so well

jjttjj18:05:16

open to other non-powershell options to work with this though

tanzoniteblack18:05:20

couple options depending on what you’re trying to do and what you have available:

tanzoniteblack18:05:46

just view/edit/search the thing in emacs directly using https://github.com/m00natic/vlfi ; which opens files in chunks

tanzoniteblack18:05:44

you can also always just use tail -n <line-count> filename > new-file.txt; while this isn’t available in powershell, it is available in emacs’ eshell

tanzoniteblack18:05:54

which I believe works just fine on Windows as well

tanzoniteblack18:05:12

(try it by invoking M-x eshell)

jjttjj18:05:41

hmmm getting a command not found but vlfi should meet my needs for now, thanks!