[Binari] here I am again with my ignorance......

does anyone know how to use the -C option in 'tar' thx, L. -- ============================================================== Lieven Sterck, PhD Tel:+32 (0)9 3313821 Fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, UGent Bioinformatics and Evolutionary Genomics Division Technologiepark 927, B-9052 Gent, Belgium Email: lieven.sterck@psb.ugent.be Website: http://bioinformatics.psb.ugent.be -------------------------------------------------------------- Algal Genetics Group UMR 7139 CNRS-UPMC Végétaux Marins et Biomolécules (Marine Plants and Biomolecules) Station Biologique Place Georges Teissier, BP74 29682 Roscoff Cedex, France Website: http://www.sb-roscoff.fr/UMR7139/en/genetics.html ============================================================== "Facts are meaningless. You could use facts to prove anything that's even remotely true!" H. Simpson

lieven sterck schreef:
does anyone know how to use the -C option in 'tar'
thx, L.
example from the man page: tar -xjf foo.tar.bz2 -C bar/ this will extract (x) and unbzip (j) the file (f) foo.tar.bz2 into the directory (C) bar/ cheers, T. -- ================================================================== Thomas Van Parys Tel:+32 (0)9 331 36 95 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM thomas.vanparys@psb.ugent.be http://bioinformatics.psb.ugent.be ==================================================================

alrighty, thx thpar/napoc, that already shed some light in the darkness .... but now I'll raise the stacks: how can i use the -C option to tar all files from a certain dir? because apparently it only works when using full file names (does not accept *.png) L. Thomas Van Parys wrote:
lieven sterck schreef:
does anyone know how to use the -C option in 'tar'
thx, L.
example from the man page: tar -xjf foo.tar.bz2 -C bar/
this will extract (x) and unbzip (j) the file (f) foo.tar.bz2 into the directory (C) bar/
cheers, T.
-- ============================================================== Lieven Sterck, PhD Tel:+32 (0)9 3313821 Fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, UGent Bioinformatics and Evolutionary Genomics Division Technologiepark 927, B-9052 Gent, Belgium Email: lieven.sterck@psb.ugent.be Website: http://bioinformatics.psb.ugent.be -------------------------------------------------------------- Algal Genetics Group UMR 7139 CNRS-UPMC Végétaux Marins et Biomolécules (Marine Plants and Biomolecules) Station Biologique Place Georges Teissier, BP74 29682 Roscoff Cedex, France Website: http://www.sb-roscoff.fr/UMR7139/en/genetics.html ============================================================== "Facts are meaningless. You could use facts to prove anything that's even remotely true!" H. Simpson

lieven sterck schreef:
alrighty, thx thpar/napoc, that already shed some light in the darkness .... but now I'll raise the stacks:
how can i use the -C option to tar all files from a certain dir? because apparently it only works when using full file names (does not accept *.png)
Not sure if you really need the -C option. tar -czvf mytar.tar.gz somedir/*png This creates a tar.gz file with all png-files in somedir T.
Thomas Van Parys wrote:
lieven sterck schreef:
does anyone know how to use the -C option in 'tar'
thx, L.
example from the man page: tar -xjf foo.tar.bz2 -C bar/
this will extract (x) and unbzip (j) the file (f) foo.tar.bz2 into the directory (C) bar/
-- ================================================================== Thomas Van Parys Tel:+32 (0)9 331 36 95 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM thomas.vanparys@psb.ugent.be http://bioinformatics.psb.ugent.be ==================================================================

indeed it does... but the prob is that it also includes the path (structure). but i kinda solved it already myself :-[ (does this means I earned myself a beer?) L. Thomas Van Parys wrote:
lieven sterck schreef:
alrighty, thx thpar/napoc, that already shed some light in the darkness .... but now I'll raise the stacks:
how can i use the -C option to tar all files from a certain dir? because apparently it only works when using full file names (does not accept *.png)
Not sure if you really need the -C option.
tar -czvf mytar.tar.gz somedir/*png
This creates a tar.gz file with all png-files in somedir
T.
Thomas Van Parys wrote:
lieven sterck schreef:
does anyone know how to use the -C option in 'tar'
thx, L.
example from the man page: tar -xjf foo.tar.bz2 -C bar/
this will extract (x) and unbzip (j) the file (f) foo.tar.bz2 into the directory (C) bar/
-- ============================================================== Lieven Sterck, PhD Tel:+32 (0)9 3313821 Fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, UGent Bioinformatics and Evolutionary Genomics Division Technologiepark 927, B-9052 Gent, Belgium Email: lieven.sterck@psb.ugent.be Website: http://bioinformatics.psb.ugent.be -------------------------------------------------------------- Algal Genetics Group UMR 7139 CNRS-UPMC Végétaux Marins et Biomolécules (Marine Plants and Biomolecules) Station Biologique Place Georges Teissier, BP74 29682 Roscoff Cedex, France Website: http://www.sb-roscoff.fr/UMR7139/en/genetics.html ============================================================== "Facts are meaningless. You could use facts to prove anything that's even remotely true!" H. Simpson

*--include* /pattern/ (*-W* *include*=/pattern/) Process only files or directories that match the specified pat- tern. Note that exclusions specified with *--exclude* take prece- dence over inclusions. If no inclusions are explicitly speci- fied, all entries are processed by default. The *--include* option is especially useful when filtering archives. For example, the command *tar* *-c* *-f* /new.tar/ *--include='*foo*'* *@*/old.tgz/ creates a new archive /new.tar/ containing only the entries from /old.tgz/ containing the string `foo'. lieven sterck wrote:
alrighty, thx thpar/napoc, that already shed some light in the darkness .... but now I'll raise the stacks:
how can i use the -C option to tar all files from a certain dir? because apparently it only works when using full file names (does not accept *.png)
L.
Thomas Van Parys wrote:
lieven sterck schreef:
does anyone know how to use the -C option in 'tar'
thx, L.
example from the man page: tar -xjf foo.tar.bz2 -C bar/
this will extract (x) and unbzip (j) the file (f) foo.tar.bz2 into the directory (C) bar/
cheers, T.
participants (3)
-
lieven sterck
-
Nathalie Pochet
-
Thomas Van Parys