Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Help on a script...
- Date: Sun, 3 Jun 2012 17:39:55 +0900
- From: Kalin KOZHUHAROV <me.kalin@example.com>
- Subject: Re: [tlug] Help on a script...
- References: <CAJA1Y2YMkk_5zub8HbUEXD-wenEmmGSOaB0nauhkT2+C97CVmA@mail.gmail.com>
On Sun, Jun 3, 2012 at 4:30 PM, Bruno Raoult <braoult@example.com> wrote: > Hi all! And happy Mother's day if it the same than in France... > > I have a question for you: Do you know how to copy (rsync via ssh) a tree > only, no files? I just want to avoid long log file, with directories... > Is this what you need: $ cd /tmp $ mkdir -p d1/D{2,3,4,5,6} d1/G{3,4}/F5 $ touch d1/D{2,3,4,5,6}/some_file d1/G{3,4}/F5/other d1/ $ touch d1/D{2,3,4,5,6}/some_file d1/G{3,4}/F5/other d1/D{2,3,4,5,6}/evenMORE $ LC_ALL=C tree d1/ d1/ |-- D2 | |-- evenMORE | `-- some_file |-- D3 | |-- evenMORE | `-- some_file |-- D4 | |-- evenMORE | `-- some_file |-- D5 | |-- evenMORE | `-- some_file |-- D6 | |-- evenMORE | `-- some_file |-- G3 | `-- F5 | `-- other `-- G4 `-- F5 `-- other $ rsync -HavPS /tmp/d1/ /tmp/d2/ --include=*/ --exclude=* sending incremental file list created directory /tmp/d2 ./ D2/ D3/ D4/ D5/ D6/ G3/ G3/F5/ G4/ G4/F5/ sent 187 bytes received 51 bytes 476.00 bytes/sec total size is 0 speedup is 0.00 $ LC_ALL=C tree d2 d2 |-- D2 |-- D3 |-- D4 |-- D5 |-- D6 |-- G3 | `-- F5 `-- G4 `-- F5 NB: order of include/exclude is important. NB2: "-HavPS" may not be the best of options, I used it every time and don't bother remembering what it means; works here Cheers, Kalin.
- Follow-Ups:
- Re: [tlug] Help on a script...
- From: Bruno Raoult
- References:
- [tlug] Help on a script...
- From: Bruno Raoult
Home | Main Index | Thread Index
- Prev by Date: [tlug] Help on a script...
- Next by Date: Re: [tlug] Help on a script...
- Previous by thread: [tlug] Help on a script...
- Next by thread: Re: [tlug] Help on a script...
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links