The number of files in a subdirectory

Solved
CYG -  
 1234 -
Hello,

I have a subdirectory that contains x files, I need a command that can count the number of files;
can someone help me

thank you in advance

CYG
Configuration: Windows 2003 Firefox 2.0.0.9

8 réponses

Jean-François Pillou Posted messages 18962 Registration date   Status Webmaster Last intervention   63 308
 
To remedy this:

ls -Al | wc -l

--
Jeff
webmaster @ comment ça marche . <net|com>
Jean-François Pillou

Fondateur de CommentCaMarche.net

47
CYG
 
Thank you very much; it works

CYG
0
Trab
 
```html

ls | wc -l aussi, mais je me demande si la commande wc permet de compter le nombre de lignes et de mots ainsi que les caractères, n'est-ce pas ? Comment cette commande peut-elle compter le nombre de fichiers d'un répertoire ?

```
0
fg
 
to count here is the command
more fichierX
0
1234
 
To count the number of files in the current directory, you can use:
A. ls | wc -l *

B. echo $PWD > wc

C. ls | wc -w

D. ls -l | wc -w

E. cat $PWD

F. cat $PWD | wc -c
0