This question already has an answer here:
- Unix ls command: show full path when using options 6 answers
I have a folder /home/Documents/myFolder
and inside this folder there are lots other folders. I want to have a file list.txt
which contains all the paths of the folders. I want the text file content like this:
/home/Documents/myFolder/1234
/home/Documents/myFolder/asd2
/home/Documents/myFolder/asdawgf
/home/Documents/myFolder/dawt
.
.
.
I tried this one but it was not what I want ls > /home/Documents/myFolde/list.txt
it just prints the folder names. I want the full paths.