HJ has asked for the wisdom of the Perl Monks concerning the following question:
Eg, If Disk A has a hierarchy as below:
Main disk: /a/b/c/Disk_A
Sub directories
/a/b/c/Disk_A/dir1/dirw/X/l
/a/b/c/Disk_A/dir2/X
/a/b/c/Disk_A/dir3/...../X
The o/p should be :
/a/b/c/Disk_A/dir1/dirw/
/a/b/c/Disk_A/dir2/
/a/b/c/Disk_A/dir3/...../
#!/usr/bin/perl -w use strict; use warnings; my @findX= `find /a/b/c/Disk_A/ -name 'X'`; print @findX;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Find a particular directory in a directory
by Eliya (Vicar) on Dec 15, 2011 at 23:23 UTC | |
|
Re: Find a particular directory in a directory
by ww (Archbishop) on Dec 16, 2011 at 02:10 UTC | |
by Anonymous Monk on Dec 16, 2011 at 04:24 UTC | |
|
Re: Find a particular directory in a directory
by Anonymous Monk on Dec 15, 2011 at 23:08 UTC | |
|
Re: Find a particular directory in a directory
by TJPride (Pilgrim) on Dec 16, 2011 at 16:14 UTC |