0

What would be the best way to chop long lines of output (and do some horizontal scrolling perhaps, but I'm not holding my breath) on Windows, using Windows command-line tools like more. I want to simulate the less -S pager.

6
  • I should've added "existing/preinstalled" (DOS command-line tools). I know that less is available on Windows, but that is not installed by default no? WSL is also not installed by default, if I understand correctly. Nov 3, 2020 at 0:05
  • And I also should've written "Win32 DOS command prompt". Nov 3, 2020 at 0:07
  • WSL is installed by default. Follow the link in my answer if you want to enable WSL and use that way.
    – Reg Edit
    Nov 3, 2020 at 10:04
  • So WSL is installed by default, but not enabled by default? When not yet enabled, is less et al available? Nov 3, 2020 at 12:03
  • No, only more. Are you limited in what you can install/enable for some reason? If you're used to Unix command-line tools you will enjoy having them under Windows, and there's no down-side as far as I know. Here are some more examples and links if you need them.
    – Reg Edit
    Nov 3, 2020 at 17:31

1 Answer 1

1

The good news is that you can use most or all of the Unix-like tools on a Windows machine.

See the GNU page for information and download links.

That is the DOS command-line tools you need!

I'm not sure where I installed mine from, as they are bundled with other things like git for Windows. I will try and add a better link but you should be able to find one if the GNU page doesn't have a direct Windows download.

EDIT It seems the commands are also now included in the Windows Subsystem for Linux (WSL) which is a Windows component you can enable. There's a page here with info about how to enable WSL if you want to do it that way.

EDIT 2 The above assumes a Windows environment, but that may be an incorrect assumption. If you want to do this literally under DOS, there were thinks like the MKS Toollkit that did the same thing, which you might want to try and get hold of.

4
  • The bad news is that those are all Win32 programs and won't run on MS-DOS... Nov 2, 2020 at 13:39
  • 1
    @user1686 True, but I'm assuming the OP means under Windows--but I may be quite wrong. We will see.
    – Reg Edit
    Nov 2, 2020 at 13:42
  • Regarding the Git installer, I think it bundles the "msys" distribution (which is somehow related to MinGW compiler suite). Nov 2, 2020 at 15:32
  • @RegEdit yes, I meant under Windows. Nov 3, 2020 at 0:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .