I figure there has to be a way of making ls only display non-directories, but the man page doesn't make it obvious
Ubuntu – How to make ls only display files
ls
Related Question
- Directory – How to Search for Files Recursively into Subdirectories
- Ubuntu – ls command is only showing files, and no folders (spaces? instead of them)
- Ubuntu – Using the ls command on an Ubuntu 14.04.10 server to explore the files
- Command-Line – What Does `ls –directory` Stand For?
- Command-Line – How to Recursively List Only Hidden Files from a Terminal
Best Answer
Using
ls -p
tellsls
to append a slash to entries which are a directory, and usinggrep -v /
tellsgrep
to return only lines not containing a slash.