Linux / UNIX Tech Support Forum
This is a discussion on Shell scripting loop through folders in directory within the Shell scripting forums, part of the Development/Scripting category; Hi, How do I UNIX / Linux shell scripting to loop through folders in directory? I would like to go ...
|
|||||||
| Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
| Sponsored Links | ||
|
|
|
|||
|
Hi Raj,
Did you try using something like #ls -lR The 'R' switch does a recursive listing # ls --help|grep '\-R' -R, --recursive list subdirectories recursively You can then build a logic of your own to process the files. So for eg a command like #ls -lR mydir will list all the folders within mydir recursively. The folders are usually followed with the number of files and then the file listings and so on. |
|
||||
|
You can use for loop or find command for the same. See our FAQ:
__________________
Vivek Gite Linux Evangelist |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Learning Shell Scripting | ricc | Shell scripting | 5 | 02-04-2009 03:11 PM |
| Shell for loop to determine whether it is a file or a directory | tusk222 | Shell scripting | 1 | 29-11-2008 12:23 AM |
| shell scripting with SMTP | Tinku | Shell scripting | 2 | 22-10-2008 10:42 AM |
| need help on shell scripting | rahul_sayz | Shell scripting | 1 | 08-12-2007 10:37 AM |
| Shell script to restructure folders recursively | kalt | Shell scripting | 2 | 26-10-2007 12:47 AM |