4 ms·
> Amazingly, there's no straightforward way to tell `ls` to output only files (that I know of): `ls -l|grep -e^-` Unless you meant without pipes/grep in which
by AdamJacobMuller 4y ago
> Amazingly, there's no straightforward way to tell `ls` to output only files (that I know of):
`ls -l|grep -e^-`
Unless you meant without pipes/grep in which case I think no, but, you're bumping up against the fact that `ls` is really more of a user-presentation tool than for scripting. Use `find . -type f` maybe with some `-maxdepth 1`