Le Thursday 19 February 2009 23:24:53 manchette, vous avez écrit :
> Promis j'avais mis le done ;)
> mais ca ne marche pas non plus :
> # for i in $(echo /*); do
>
> >    [ "$(echo $i | grep -v "\(dev\|proc\|sys\)")" ] && \
> >         du -hLx $i | sort -n >> liste.txt
> > done
Le '\' veut dire que la ligne continue après le retour chariot avec le 
reste, ' du -hLx ...'

Si tu as des difficultés pour copie le bout de code dans une console, alors 
prendre ce qui suit sur UNE ligne:

$ for i in $(echo /*); do [ "$(echo $i | grep -v "\(dev\|proc\|sys\)")" ] && 
du -hLx $i | sort -n >> liste.txt; done

On suppose que 'du' et 'sort' soient bien là.

> bash:  : command not found
> bash:  : command not found
> bash:  : command not found
> bash:  : command not found
> bash:  : command not found
> bash:  : command not found
> bash:  : command not found
> bash:  : command not found
> bash:  : command not found
> bash:  : command not found
> bash:  : command not found
> bash:  : command not found
> bash:  : command not found
> bash:  : command not found
> bash:  : command not found
> bash:  : command not found
> bash:  : command not found
> bash:  : command not found
> bash:  : command not found
> bash:  : command not found
> bash:  : command not found
> linux-d2g5:/home/fabrice #
>
> est ce lié au > qui s'ajoute en début de ligne lorsque je colle ce code en
> console ?
>
> Fabrice
>
> Le jeudi 19 février 2009 22:51:21, List a écrit :
> > Le Thursday 19 February 2009 22:31:25 manchette, vous avez écrit :
> > > Quand je fais ce qui suit cela ne me donne rien ,
> > >
> > > # for i in $(echo /*); do
> > >
> > > >    [ "$(echo $i | grep -v "\(dev\|proc\|sys\)")" ] && \
> > > >         du -hLx $i | sort -n >> liste.txt
> >
> > Chez moi non plus !
> > Il manque la fin du code, en jetant deux yeux ou trois il manque 'done'
> > pour finir la boucle 'for' ;)
> >
> > > > Ici pour générer une liste plus 'humaine' des répertoires
> > > > en écartant /dev /proc et /sys  (aussi sous root):
> > > > for i in $(echo /*); do
> > > >    [ "$(echo $i | grep -v "\(dev\|proc\|sys\)")" ] && \
> > > >         du -hLx $i | sort -n >> liste.txt
> > > > done
> >
> > Au travail !
> > --
> >
> > In Microsoft products, failure is not an option. It is a standard
> > feature.
>
> --
> Fabrice



-- 

In Microsoft products, failure is not an option. It is a standard feature.
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Répondre à