What is the bash command to get a list of files in a directory? and they need their full address, not just the name. And only that. Without specifying access rights and other information.

    2 answers 2

    1) using find

    find `pwd` -mindepth 1 find <folder> -mindepth 1 find `pwd`/* find <folder>/* 

    2) using ls

     ls | xargs -n 1 -i echo "`pwd`/{}" ls <folder> | xargs -n 1 -i echo "<folder>/{}" 
    • Thank. True, the same find, when the list of files is output, first writes the directory itself, which is searched. Is it possible to do something so that it does not appear? - carapuz
     $ tree -i -f -L 1 

    f - show full paths, L - nesting level

    If you want to trim the parent directory and the final output, then:

     $ tree -i -f -L 1 | head -n -2 | tail -n +2