tar - exclude

Giorgos Keramidas keramidi at otenet.gr
Mon May 14 15:55:01 EEST 2001


On Mon, May 14, 2001 at 12:21:57PM +0300, Kwsths wrote:
> mallon den egrapsa swsta ayta poy ekana.
> edina
> tar  -X exclusions
> 
> aplws 3exasa na grapsw to  -from ...
> 
> egw den 8elw na bgalw kapoio arxeio alla directory.
> 
> to arxeio exclusions, na 8elw na bgalw 3 dirs px , 8a einai :
> dir1
> dir2
> dir3
> 
> ?
> h 8elei koma ? px dir1;dir2;dir3?
> 
> ayto rwtaw.

Se auto to shmeio exeis ena dikio, to manpage tou GNU tar einai epioikws
aparadekto.  Basika to arxeio me ta exclusions periexei mia seira apo
patterns ta opoia ta dokimazei ena ena sta filenames twn arxeiwn, ki an
kanei kapoio, estw kai ena match, to arxeio den mpainei sto tarball.

Gia paradeigma:

	% mkdir -p hello
	% mkdir -p hello/there
	% touch hello/there/READ.THIS
	% mkdir -p hello/world
	% mkdir -p hello/cruel/world

an tora ftiajeis ena arxeio 'exclusions' h opws alliws theleis pou na exei
mesa ta ejhs:

	% cat exclusions
	*world*
	*nomatch*

Tote mporeis na kaneis:

	% tar cvXf exclusions hello.tar hello

Kai tha deis oti oute to hello/world oute to hello/cruel/world tha einai
sto tarball pou tha bgei san apotelesma.  To pattern `*nomatch*' den kanei
tipota fusika afou kanena arxeio den kanei match me auto, alla katalabes ti
genikh idea tora :)

--giorgos




More information about the Linux-greek-users mailing list