[Gllug] Locating Subdirectories
Nix
nix at esperi.org.uk
Wed Jul 28 07:23:21 UTC 2004
On Tue, 27 Jul 2004, Stig Brautaset moaned:
> On Tue, Jul 27, 2004 at 11:51:12AM +0100, Mick Farmer wrote:
>> Dear GLLUGers,
>>
>> I need to obtain the names of all the subdirectories in the
>> current directory. I'm currently using the following.
>>
>> find * -type d -maxdepth 0
>
> find . -type d -maxdepth 1 -printf "%f\n"
Why -printf, not just -print?
(Or, with GNU find, nothing at all as the operation, as -print is the
default?)
--
`The copyright file is for everyone. That we make it available in
plain-text, uncompressed form rather than in spinning, throbbing
OpenGL-rendered 3D text over a thumping dance music soundtrack is a
feature, not a bug.' --- Branden Robinson
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list