How to recursively list all files and directories

前端 未结 8 1983
长发绾君心
长发绾君心 2021-02-01 03:32

Using the tcsh shell on Free BSD, is there a way to recursively list all files and directories including the owner, group and relative path to the file?

ls -alR comes cl

8条回答
  •  你的背包
    2021-02-01 03:57

    find comes close:

    find . -printf "%u %g %p\n"
    

    There is also "%P", which removes the prefix from the filename, if you want the paths to be relative to the specified directory.

    Note that this is GNU find, I don't know if the BSD find also supports -printf.

提交回复
热议问题