Recursively list all files in a directory including files in symlink directories

后端 未结 8 945
甜味超标
甜味超标 2020-12-07 07:46

Suppose I have a directory /dir inside which there are 3 symlinks to other directories /dir/dir11, /dir/dir12, and /dir/dir13

8条回答
  •  被撕碎了的回忆
    2020-12-07 08:30

    I knew tree was an appropriate, but I didn't have tree installed. So, I got a pretty close alternate here

    find ./ | sed -e 's/[^-][^\/]*\//--/g;s/--/ |-/'
    

提交回复
热议问题