Salut,

L'appel système truncate conserve le début du fichier... alors qu'il s'agit ici 
d'en conserver la fin en commençant par un retour de ligne.

http://manpages.ubuntu.com/manpages/maverick/man1/shrinkfile.1.html

Bref pour faire "sur place", il faut faire une copie de contenu avant le 
truncate.

Yves 

----- Message d'origine -----
> 2011/1/3 Félix Hauri <[email protected]>:
> > $ man truncate
> >  truncate - shrink or extend the size of a file to the specified size
> > 
> > Shrink *or* extend!!!
> > 
> 
> > Bref, ce n'est probablement pas ce que tu cherches...
> > 
> 
> 
> Oui mais je vois assez d'options dans
> http://www.gnu.org/software/coreutils/manual/html_node/truncate-invocation.html
> 
> size may also be prefixed by one of the following to adjust the size
> of each file based on their current size:
> 
>                     ‘+’   => extend by
>                     ‘-’   => reduce by
>                     ‘<’   => at most
>                     ‘>’   => at least
>                     ‘/’   => round down to multiple of
>                     ‘%’   => round up to multiple of
> 
> 
> Marc
> _______________________________________________
> gull mailing list
> [email protected]
> http://forum.linux-gull.ch/mailman/listinfo/gull

_______________________________________________
gull mailing list
[email protected]
http://forum.linux-gull.ch/mailman/listinfo/gull

Répondre à