
ok, don't want to spend half an hour googling and reading man-pages: I have a directory with 25 subdirectories (each containing from 200MB to 3 GB of data) I want to have each subdirectory archived in a separate archive file. Any idea on how to do this in 1 command? Michiel -- ================================================================== Michiel Van Bel PhD student 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 mibel@psb.vib-ugent.be http://www.psb.vib-ugent.be http://bioinformatics.psb.ugent.be ==================================================================

Michiel Van Bel wrote:
ok, don't want to spend half an hour googling and reading man-pages: I have a directory with 25 subdirectories (each containing from 200MB to 3 GB of data) I want to have each subdirectory archived in a separate archive file.
Any idea on how to do this in 1 command?
Michiel
tar -cvf firstone.tar firstone;tar -cvf secondone.tar secondone; tar -cvf thirdone.tar thirdone; ... ? :p -- ================================================================== Frederik Delaere Tel:+32 (0)9 331 38 14 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM frlae@psb.vib-ugent.be http://www.psb.vib-ugent.be ==================================================================

Frederik Delaere wrote:
Michiel Van Bel wrote:
ok, don't want to spend half an hour googling and reading man-pages: I have a directory with 25 subdirectories (each containing from 200MB to 3 GB of data) I want to have each subdirectory archived in a separate archive file.
Any idea on how to do this in 1 command?
Michiel
tar -cvf firstone.tar firstone;tar -cvf secondone.tar secondone; tar -cvf thirdone.tar thirdone; ... ? :p
very funny :-/ tar cfvz *.tar * also doesn't work :-p -- ================================================================== Michiel Van Bel PhD student 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 mibel@psb.vib-ugent.be http://www.psb.vib-ugent.be http://bioinformatics.psb.ugent.be ==================================================================

find -type d -exec tar -cf {}.tar {} \; ongeveer zoiets als je't niet meteen vindt wil ik meer moeite doen :-) On Thu, 2010-06-10 at 14:45 +0200, Michiel Van Bel wrote:
ok, don't want to spend half an hour googling and reading man-pages: I have a directory with 25 subdirectories (each containing from 200MB to 3 GB of data) I want to have each subdirectory archived in a separate archive file.
Any idea on how to do this in 1 command?
Michiel
-- ================================================================== Marijn Vandevoorde 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 marijn.vandevoorde@psb.ugent.be http://bioinformatics.psb.ugent.be ================================================================== "Stop! Hammer Time!" --M.C. Hammer

met een puntje achter de find weliswaar. voor de rest zou het redelijk close moeten zijn On Thu, 2010-06-10 at 14:50 +0200, Marijn Vandevoorde wrote:
find -type d -exec tar -cf {}.tar {} \; ongeveer zoiets
als je't niet meteen vindt wil ik meer moeite doen :-)
On Thu, 2010-06-10 at 14:45 +0200, Michiel Van Bel wrote:
ok, don't want to spend half an hour googling and reading man-pages: I have a directory with 25 subdirectories (each containing from 200MB to 3 GB of data) I want to have each subdirectory archived in a separate archive file.
Any idea on how to do this in 1 command?
Michiel
-- ================================================================== Marijn Vandevoorde 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 marijn.vandevoorde@psb.ugent.be http://bioinformatics.psb.ugent.be ================================================================== "Stop! Hammer Time!" --M.C. Hammer

[mibel@midas test_tar]$ find . -type d -exec tar -cf {}.tar {} \; tar: ./.tar: file is the archive; not dumped [mibel@midas test_tar]$ meh :-/ Nog niet volledig Marijn Vandevoorde wrote:
met een puntje achter de find weliswaar. voor de rest zou het redelijk close moeten zijn
On Thu, 2010-06-10 at 14:50 +0200, Marijn Vandevoorde wrote:
find -type d -exec tar -cf {}.tar {} \; ongeveer zoiets
als je't niet meteen vindt wil ik meer moeite doen :-)
On Thu, 2010-06-10 at 14:45 +0200, Michiel Van Bel wrote:
ok, don't want to spend half an hour googling and reading man-pages: I have a directory with 25 subdirectories (each containing from 200MB to 3 GB of data) I want to have each subdirectory archived in a separate archive file.
Any idea on how to do this in 1 command?
Michiel
-- ================================================================== Michiel Van Bel PhD student 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 mibel@psb.vib-ugent.be http://www.psb.vib-ugent.be http://bioinformatics.psb.ugent.be ==================================================================

find . -type d -maxdepth 1 -exec tar -cf {}.tar {} \; voor het geval er nog meer subdirs zijn ? Marijn Vandevoorde wrote:
find -type d -exec tar -cf {}.tar {} \; ongeveer zoiets
als je't niet meteen vindt wil ik meer moeite doen :-)
On Thu, 2010-06-10 at 14:45 +0200, Michiel Van Bel wrote:
ok, don't want to spend half an hour googling and reading man-pages: I have a directory with 25 subdirectories (each containing from 200MB to 3 GB of data) I want to have each subdirectory archived in a separate archive file.
Any idea on how to do this in 1 command?
Michiel
-- ================================================================== Frederik Delaere Tel:+32 (0)9 331 38 14 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM frlae@psb.vib-ugent.be http://www.psb.vib-ugent.be ==================================================================

Op 10-06-10 14:53, Frederik Delaere schreef:
find . -type d -maxdepth 1 -exec tar -cf {}.tar {} \;
find -maxdepth 1 -type d -not -name . -exec tar -cf {}.tar {} \; Anders begint die leukerd eerst je huidige directory volledig te tarren.
voor het geval er nog meer subdirs zijn ?
Marijn Vandevoorde wrote:
find -type d -exec tar -cf {}.tar {} \; ongeveer zoiets
als je't niet meteen vindt wil ik meer moeite doen :-)
On Thu, 2010-06-10 at 14:45 +0200, Michiel Van Bel wrote:
ok, don't want to spend half an hour googling and reading man-pages: I have a directory with 25 subdirectories (each containing from 200MB to 3 GB of data) I want to have each subdirectory archived in a separate archive file.
Any idea on how to do this in 1 command?
Michiel
-- ================================================================== 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.vib-ugent.be http://bioinformatics.psb.ugent.be ==================================================================

Thomas Van Parys wrote:
Op 10-06-10 14:53, Frederik Delaere schreef:
find . -type d -maxdepth 1 -exec tar -cf {}.tar {} \;
find -maxdepth 1 -type d -not -name . -exec tar -cf {}.tar {} \;
Anders begint die leukerd eerst je huidige directory volledig te tarren.
Still... not entirely correct: [mibel@midas test_tar]$ ll -a total 20 drwxr-xr-x 5 mibel biocomp 4096 Jun 10 15:16 . drwxr-xr-x 5 mibel biocomp 4096 Jun 10 14:41 .. drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:05 dir1 drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:05 dir2 drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:06 dir3 [mibel@midas test_tar]$ find -type d -not -name . -exec tar cf {}.tar {} \; [mibel@midas test_tar]$ ll -a total 32 drwxr-xr-x 5 mibel biocomp 4096 Jun 10 15:17 . drwxr-xr-x 5 mibel biocomp 4096 Jun 10 14:41 .. drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:05 dir1 drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:05 dir2 drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:06 dir3 -rw-r--r-- 1 mibel biocomp 10240 Jun 10 15:17 .tar de directory name wordt precies niet voor de tar-extensie geplaatst :-/
voor het geval er nog meer subdirs zijn ?
Marijn Vandevoorde wrote:
find -type d -exec tar -cf {}.tar {} \; ongeveer zoiets
als je't niet meteen vindt wil ik meer moeite doen :-)
On Thu, 2010-06-10 at 14:45 +0200, Michiel Van Bel wrote:
ok, don't want to spend half an hour googling and reading man-pages: I have a directory with 25 subdirectories (each containing from 200MB to 3 GB of data) I want to have each subdirectory archived in a separate archive file.
Any idea on how to do this in 1 command?
Michiel
-- ================================================================== Michiel Van Bel PhD student 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 mibel@psb.vib-ugent.be http://www.psb.vib-ugent.be http://bioinformatics.psb.ugent.be ==================================================================

find -maxdepth 1 -type d -not -name . -exec tar -cf "{}.tar" {} \; Dit werkt wel :-) Bedankt voor alle hulp :-) Michiel Van Bel wrote:
Thomas Van Parys wrote:
Op 10-06-10 14:53, Frederik Delaere schreef:
find . -type d -maxdepth 1 -exec tar -cf {}.tar {} \;
find -maxdepth 1 -type d -not -name . -exec tar -cf {}.tar {} \;
Anders begint die leukerd eerst je huidige directory volledig te tarren.
Still... not entirely correct: [mibel@midas test_tar]$ ll -a total 20 drwxr-xr-x 5 mibel biocomp 4096 Jun 10 15:16 . drwxr-xr-x 5 mibel biocomp 4096 Jun 10 14:41 .. drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:05 dir1 drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:05 dir2 drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:06 dir3 [mibel@midas test_tar]$ find -type d -not -name . -exec tar cf {}.tar {} \; [mibel@midas test_tar]$ ll -a total 32 drwxr-xr-x 5 mibel biocomp 4096 Jun 10 15:17 . drwxr-xr-x 5 mibel biocomp 4096 Jun 10 14:41 .. drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:05 dir1 drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:05 dir2 drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:06 dir3 -rw-r--r-- 1 mibel biocomp 10240 Jun 10 15:17 .tar
de directory name wordt precies niet voor de tar-extensie geplaatst :-/
voor het geval er nog meer subdirs zijn ?
Marijn Vandevoorde wrote:
find -type d -exec tar -cf {}.tar {} \; ongeveer zoiets
als je't niet meteen vindt wil ik meer moeite doen :-)
On Thu, 2010-06-10 at 14:45 +0200, Michiel Van Bel wrote:
ok, don't want to spend half an hour googling and reading man-pages: I have a directory with 25 subdirectories (each containing from 200MB to 3 GB of data) I want to have each subdirectory archived in a separate archive file.
Any idea on how to do this in 1 command?
Michiel
-- ================================================================== Michiel Van Bel PhD student 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 mibel@psb.vib-ugent.be http://www.psb.vib-ugent.be http://bioinformatics.psb.ugent.be ==================================================================

Op 10-06-10 15:19, Michiel Van Bel schreef:
find -maxdepth 1 -type d -not -name . -exec tar -cf "{}.tar" {} \;
Dit werkt wel :-)
Bedankt voor alle hulp :-)
Als snelheid niet belangrijk is, zou ik nog proberen te comprimeren: find -maxdepth 1 -type d -not -name . -exec tar -czf "{}.tar.gz" {} \;
Michiel Van Bel wrote:
Thomas Van Parys wrote:
Op 10-06-10 14:53, Frederik Delaere schreef:
find . -type d -maxdepth 1 -exec tar -cf {}.tar {} \;
find -maxdepth 1 -type d -not -name . -exec tar -cf {}.tar {} \;
Anders begint die leukerd eerst je huidige directory volledig te tarren.
Still... not entirely correct: [mibel@midas test_tar]$ ll -a total 20 drwxr-xr-x 5 mibel biocomp 4096 Jun 10 15:16 . drwxr-xr-x 5 mibel biocomp 4096 Jun 10 14:41 .. drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:05 dir1 drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:05 dir2 drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:06 dir3 [mibel@midas test_tar]$ find -type d -not -name . -exec tar cf {}.tar {} \; [mibel@midas test_tar]$ ll -a total 32 drwxr-xr-x 5 mibel biocomp 4096 Jun 10 15:17 . drwxr-xr-x 5 mibel biocomp 4096 Jun 10 14:41 .. drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:05 dir1 drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:05 dir2 drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:06 dir3 -rw-r--r-- 1 mibel biocomp 10240 Jun 10 15:17 .tar
de directory name wordt precies niet voor de tar-extensie geplaatst :-/
voor het geval er nog meer subdirs zijn ?
Marijn Vandevoorde wrote:
find -type d -exec tar -cf {}.tar {} \; ongeveer zoiets
als je't niet meteen vindt wil ik meer moeite doen :-)
On Thu, 2010-06-10 at 14:45 +0200, Michiel Van Bel wrote:
ok, don't want to spend half an hour googling and reading man-pages: I have a directory with 25 subdirectories (each containing from 200MB to 3 GB of data) I want to have each subdirectory archived in a separate archive file.
Any idea on how to do this in 1 command?
Michiel
-- ================================================================== 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.vib-ugent.be http://bioinformatics.psb.ugent.be ==================================================================

2.45PM: ok, don't want to spend half an hour googling and reading man-pages: 3.19PM: Dit werkt wel :-) hmmmm :) Michiel Van Bel wrote:
find -maxdepth 1 -type d -not -name . -exec tar -cf "{}.tar" {} \;
Dit werkt wel :-)
Bedankt voor alle hulp :-)
Michiel Van Bel wrote:
Thomas Van Parys wrote:
Op 10-06-10 14:53, Frederik Delaere schreef:
find . -type d -maxdepth 1 -exec tar -cf {}.tar {} \;
find -maxdepth 1 -type d -not -name . -exec tar -cf {}.tar {} \;
Anders begint die leukerd eerst je huidige directory volledig te tarren.
Still... not entirely correct: [mibel@midas test_tar]$ ll -a total 20 drwxr-xr-x 5 mibel biocomp 4096 Jun 10 15:16 . drwxr-xr-x 5 mibel biocomp 4096 Jun 10 14:41 .. drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:05 dir1 drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:05 dir2 drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:06 dir3 [mibel@midas test_tar]$ find -type d -not -name . -exec tar cf {}.tar {} \; [mibel@midas test_tar]$ ll -a total 32 drwxr-xr-x 5 mibel biocomp 4096 Jun 10 15:17 . drwxr-xr-x 5 mibel biocomp 4096 Jun 10 14:41 .. drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:05 dir1 drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:05 dir2 drwxr-xr-x 2 mibel biocomp 4096 Jun 10 15:06 dir3 -rw-r--r-- 1 mibel biocomp 10240 Jun 10 15:17 .tar
de directory name wordt precies niet voor de tar-extensie geplaatst :-/
voor het geval er nog meer subdirs zijn ?
Marijn Vandevoorde wrote:
find -type d -exec tar -cf {}.tar {} \; ongeveer zoiets
als je't niet meteen vindt wil ik meer moeite doen :-)
On Thu, 2010-06-10 at 14:45 +0200, Michiel Van Bel wrote:
ok, don't want to spend half an hour googling and reading man-pages: I have a directory with 25 subdirectories (each containing from 200MB to 3 GB of data) I want to have each subdirectory archived in a separate archive file.
Any idea on how to do this in 1 command?
Michiel
-- ================================================================== Frederik Delaere Tel:+32 (0)9 331 38 14 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM frlae@psb.vib-ugent.be http://www.psb.vib-ugent.be ==================================================================
participants (4)
-
Frederik Delaere
-
Marijn Vandevoorde
-
Michiel Van Bel
-
Thomas Van Parys