List all the files in the present path and Folders and subfolders files also

Hi,

I need a script/command to list out all the files in current path and also the files in folder and subfolders.

Ex: My files are like below

$ ls -lrt
total 8
-rw-r--r-- 1 abc users 419 May 25 10:27 abcd.xml
drwxr-xr-x 3 abc users 4096 May 25 10:28 TEST
$

Under TEST, there are two more folders TEST/Exec and TEST/Exec/Result.

Now I need Output like:

-rw-r--r-- 1 abc users 419 May 25 10:27 abcd.xml
TEST:
total 8
drwxr-xr-x 2 abc users 4096 May 25 11:44 Exec
-rw-r--r-- 1 abc users 540 May 25 10:28 xyz.xml
 
TEST/Exec:
total 4
-rw-r--r-- 1 abc users 3765 May 25 10:23 tc
drwxr-xr-x 2 abc users 4096 May 25 12:44 Result
TEST/Exec/Result:
-rw-r--r-- 1 abc users 3765 May 25 10:23 results

Note: I have tried ll * and ll*/* but didn't worked

Thanks in advance..

find ./ -type f
1 Like
 
ls -R
1 Like