[gull] Tronquer des fichiers log
Yves Martin
ymartin1040 at gmail.com
Mon Jan 3 18:27:53 CET 2011
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 <felix at f-hauri.ch>:
> > $ 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
> gull at forum.linux-gull.ch
> http://forum.linux-gull.ch/mailman/listinfo/gull
More information about the gull
mailing list