[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] Como listar os subdiretórios ?
From: |
Andreyev Dias de Melo |
Subject: |
Re: [shell-script] Como listar os subdiretórios ? |
Date: |
Thu, 21 Oct 2004 16:55:17 -0300 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 MultiZilla/1.6.4.0b |
Fábio Batista wrote:
Todos os subdiretórios?
Tente:
find -type d
Se vc quiser apenas os diretórios imediatamente abaixo de onde vc está:
$ find ./ -type d -maxdepth 1
Indique ao maxdepth até que nível o find pode 'descer', do man do find:
-maxdepth levels
Descend at most levels (a non-negative integer) levels of direc-
tories below the command line arguments. `-maxdepth 0' means
only apply the tests and actions to the command line arguments.
Cabe lembrar que o resultado pode variar:
$ find --version
GNU find version 4.1.7
HIH!
Andreyev