[Solved] Reading text files

Hi guys, I hope this isn't a stupid question, but is it possible to view a .txt file which is saved on to the LEDE router?

Any help would be much appreciated,
Thank you in advance

Any of the "standard" command-line tools, such as
cat
vi
less
or if you want to get fancier, install nano or the "real" less with opkg

If you are a Windows user, WinSCP is a good tool to have...

https://winscp.net/eng/download.php

You can use Notepad to view text files.

Thanks guys, I actually tried vi and cat.
I reckon I mustn't be writing to the text file properly because it's just blank when I open it that's why I was questioning if I was opening it correctly.
Thanks again

Does ls -l show the file size is not zero?

It's just blank(no file size displayed) so I am DEFINITELY not writing to the text file correctly. Thanks

How are you writing to the text file?

The problem was the way I was parsing using awk. All sorted now thank you all for the help

1 Like

You can even view binary, hexdump -C filename :wink:

yeah i prefer nano over vi, vi is a little more complicated with editing text files. where as nano you can just make a change then control x, y, then enter.

Nano seems better because most people are capable of saving the content without reading manual :slight_smile: But once I learned vi I got used to it, because it is always installed :wink:

1 Like

Thats why you compile your own firmware and edit your configuration to include nano rather than vi :stuck_out_tongue:

...and fail to build bin because it is too big :stuck_out_tongue_winking_eye:

...then you go for extroot :yum: