I want to list all files and folders of music directory of android mobile. Where I am using
ls -l -R /sdcard/music
It gives all files and folders but not in a proper way.
Any one tell me adb shell command that displays files and folders hierarchy of a directory like "tree" linux command.
I don't know if you still looking for this, but I believe this command can help you (works on adb as well):
find . -print | sort | sed 's;[^/]*/;|---;g;s;---|; |;g'
It prints a directory tree (both folders and files) in a more readable way than
ls -l -R
If you want just a folder tree, you can use this one:
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With