Recursively List all directories and files

后端 未结 7 1766
萌比男神i
萌比男神i 2021-01-30 20:19

I would like to receive the following output.

Suppose the directory structure on the file system is like this:

  -dir1
      -dir2
        -file1
        -fi         


        
相关标签:
7条回答
  • 2021-01-30 21:23

    in shell:

    find . -type d
    

    gives directories from current working directory, and:

    find . -type f
    

    gives files from current working directory.

    Replace . by your directory of interest.

    0 讨论(0)
提交回复
热议问题