You can use Linux ls command with -R option to recursively list files and directories in Linux bash shell. In order to list the full path of the files and directories, combine the ls -R command with awk as shown below.
1 2 3 4 5 6 7 8 9 |
## List specific directory recursively ## ls -R ls -R /etc/ ## List full path recursively one per line ls -R /etc | awk ' /:$/&&f{s=$0;f=0} /:$/&&!f{sub(/:$/,"");s=$0;f=1;next} NF&&f{ print s"/"$0 }' |