J.O. Aho has given you the answer.
Here are some one-liner commands from my notes file.
find /media/sample -type d -exec ls -al -1 -d {} + > /mnt/temp/directories.txt
find /media/sample -type f -exec ls -al -1 {} + > /mnt/temp/filelist.txt
Just be careful when crafting material like this, that you do not
accidentally lose access to the area you are working in. Sometimes,
the order you execute a series of one-liners, has consequences.
For an amateur administrator, creating a "sample tree" for practicing
the commands, is a good idea. Then, only the small sample area is
damaged by your mistake. Rather than a large tree of files that
will take a lot of time to correct.
Even how a partition is mounted, matters. It's possible for example,
for a partition to be mounted in such a way, that gratuitous usage
of "sudo" does not work. So the very first thing you do as an
amateur admin, is check how a partition is mounted, the exact command used.
To see if the mount happens to be a "tricky one". An obvious case of a
tricky mount, is a read-only mount, where you won't be changing any
permissions or ownership, any time soon. You can remount rw to fix that.
Paul