How to get a list of file names in different lines

Amir Rachum picture Amir Rachum · Mar 1, 2011 · Viewed 62.7k times · Source

I want to get a list of all the files in a directory, like with ls, so that each filename will be on a seperate line, without the extra details supplied by ls -l. I looked at ls --help and didn't find a solution. I tried doing

ls -l | cut --fields=9 -d" "

but ls doesn't use a fixed number of spaces between columns. Any idea on how to do this, preferably in one line?

Answer

Šimon Tóth picture Šimon Tóth · Mar 1, 2011

ls -1

That is a number, not small L.