O comando geral para listar o conteúdo do diretório no Linux é ls
LS(1) User Commands LS(1)
NAME
ls - list directory contents
SYNOPSIS
ls [OPTION]... [FILE]...
DESCRIPTION
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort is speci‐
fied.
Provavelmente, o equivalente mais próximo a dir /w será ls -C (a opção /p - pausa - não faz sentido ao gravar em um arquivo). Então
ls -C > file.txt
Na verdade, também há um comando dir no Linux - então você pode fazer apenas dir > file.txt