0

This question already has an answer here:

for listing only directories in Unix i can use ls -ld */,

how to list only files?

problem - I have some of files and directories in a directory, i want list only files

marked as duplicate by cuonglm, Community Aug 7 '15 at 7:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • FWIW, -d doesn't list only directories. If given a bunch of files and directories, it will list the files as-is and will list the directory names rather than their contents (listing directory contents is the default behavior of ls without the switch). – Joseph R. Aug 7 '15 at 7:42
  • yeah it's the '/' that matches lists only directories – Jasen Aug 7 '15 at 8:27

Browse other questions tagged or ask your own question.