Reproducing a file structure without reproducing files in it - BSD

This is a discussion on Reproducing a file structure without reproducing files in it - BSD ; I have two machines on the same network so I can mount one on the other. Machine A has a files structure with many subdirectories and files (7GB). I want to reproduce A's file structure on machine B, but without ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Reproducing a file structure without reproducing files in it

  1. Reproducing a file structure without reproducing files in it

    I have two machines on the same network so I can mount one on the other.

    Machine A has a files structure with many subdirectories and files (7GB). I
    want to reproduce A's file structure on machine B, but without the files.

    I suppose I could do this with a for loop on machine A, isolate
    subdirectories and create new ones on machine B.

    Is there some niftier way to do this?

    TIA
    Bernard Higonnet

  2. Re: Reproducing a file structure without reproducing files in it

    Le 4 décembre 2006 à 11:25, Bernard T. Higonnet a écrit :

    > Is there some niftier way to do this?


    Something like :

    find . -type d -print0 | cpio -o -0 > blah.cpio

    Maybe ?

    (If you want to create the remote strcuture directly, you can use netcat
    inbetween, lots of chewing-gum and a toothpick, and you're set...)

    Fred
    --
    Sweet boy, come in I am the dark side of you
    Die for my sins Like the One once did (Nightwish,
    Cinnamon bed For your unashamed appetite Bare Grace
    A figurante This dance will hurt like hell Misery)

  3. Re: Reproducing a file structure without reproducing files in it

    Bernard T. Higonnet :

    > Machine A has a files structure with many subdirectories and files
    > (7GB). I want to reproduce A's file structure on machine B, but
    > without the files.
    >
    > I suppose I could do this with a for loop on machine A, isolate
    > subdirectories and create new ones on machine B.
    >
    > Is there some niftier way to do this?


    With mtree(8) ?


  4. Re: Reproducing a file structure without reproducing files in it

    On 2006-12-04, Patrick Lamaizière wrote:
    > Bernard T. Higonnet :
    >
    >> Machine A has a files structure with many subdirectories and files
    >> (7GB). I want to reproduce A's file structure on machine B, but
    >> without the files.
    >>
    >> I suppose I could do this with a for loop on machine A, isolate
    >> subdirectories and create new ones on machine B.
    >>
    >> Is there some niftier way to do this?

    >
    > With mtree(8) ?


    Yes, definitely mtree, it's the entire raison d'etre for this tool.

    Kris

+ Reply to Thread