\documentclass{article}
\begin{document}
\immediate\write18{ls}
\end{document}
