Alors je me réponds comme un grand (un coup de zazard monstrueux m'ayant
fait tomber sur un petit script répondant à mes problèmes ...
Je vous le fait parvenir (si jamais, qui sait)
#!/bin/csh -f
#--------- cntfiles: count # of files and subdirs
# usage: cntfiles [dir]
#
set dir = "$1"
#
if ( "$1" == "" ) then
echo " --- cntfiles: Counting # of files and subdirs in ./ :"
echo ""
set nfiles = `ls -l | grep "^-"| wc -l`
set ndirs = `ls -l | grep "^d"| wc -l`
echo " ---> ./ contains: $nfiles files and $ndirs subdirs"
else
echo " --- Counting # of files and dirs in $dir dir tree:"
echo ""
set nfiles = `ls -l $dir/* | grep "^-"| wc -l`
set ndirs = `ls -l $dir/* | grep "^d"| wc -l`
echo " ---> $dir contains: $nfiles files in $ndirs subdirs"
endif
### based on: Unix Tip #499- May 14, 1998
###
http://www.ugu.com/sui/ugu/show?tip.today
--
///
(. .)
----------------------oOO-(_)-OOo------------------------------
* Gwenael MOREAU | *
* Equipe de Spectroscopie Infrarouge |Linux is like a *
* Campus de Beaulieu |wigwam - no windows, *
* Bd Gal Leclerc 35 Rennes |no gates, apache inside *
* Tel 02.99.28.67.53 (Fax 69.57) | *
---------------------------------------------------------------
|| ||
ooO Ooo