Am 23.08.2016 um 09:18 schrieb Daniel Braniss:> >> On 23 Aug 2016, at 10:06, Gerhard Schmidt <estartu at ze.tum.de> wrote: >> >> Hi, >> >> i'm quite often use tar to copy files using >> >> tar cf - /some/dir | (cd /dest/dir; tar xvvf - ) > the ?new? way: > tar cf - /some/dir | tar xvvd - -C /dest/dir > which of course does not explain way your version hangs, but this one is cleaner, and btw, don?t > include /.that's very strange. It's working, but doesn't solve another related problem. When i pipe the tar thru nc a have the same problem as my version. And it's no difference if there is a tar c an the receiving end of nc or just a '> file.tar' Regards Estartu -- ------------------------------------------------- Gerhard Schmidt | E-Mail: schmidt at ze.tum.de TU-M?nchen | Jabber: estartu at ze.tum.de WWW & Online Services | Tel: 089/289-25270 | Fax: 089/289-25257 | PGP-Publickey auf Anfrage
> On 23 Aug 2016, at 10:35, Gerhard Schmidt <estartu at ze.tum.de> wrote: > > Am 23.08.2016 um 09:18 schrieb Daniel Braniss: >> >>> On 23 Aug 2016, at 10:06, Gerhard Schmidt <estartu at ze.tum.de> wrote: >>> >>> Hi, >>> >>> i'm quite often use tar to copy files using >>> >>> tar cf - /some/dir | (cd /dest/dir; tar xvvf - ) >> the ?new? way: >> tar cf - /some/dir | tar xvvd - -C /dest/dir >> which of course does not explain way your version hangs, but this one is cleaner, and btw, don?t >> include /. > > that's very strange. It's working, but doesn't solve another related > problem. When i pipe the tar thru nc a have the same problem as my > version. And it's no difference if there is a tar c an the receiving end > of nc or just a '> file.tar? >try with different shells. (sh/bash/csh/zsh/?)> Regards > Estartu > > > > -- > ------------------------------------------------- > Gerhard Schmidt | E-Mail: schmidt at ze.tum.de <mailto:schmidt at ze.tum.de> > TU-M?nchen | Jabber: estartu at ze.tum.de <mailto:estartu at ze.tum.de> > WWW & Online Services | > Tel: 089/289-25270 | > Fax: 089/289-25257 | PGP-Publickey auf Anfrage
Hello, On Tue, Aug 23, 2016 at 09:35:12AM +0200, Gerhard Schmidt wrote:> Am 23.08.2016 um 09:18 schrieb Daniel Braniss: > > > >> On 23 Aug 2016, at 10:06, Gerhard Schmidt <estartu at ze.tum.de> wrote: > >> > >> Hi, > >> > >> i'm quite often use tar to copy files using > >> > >> tar cf - /some/dir | (cd /dest/dir; tar xvvf - ) > > the ?new? way: > > tar cf - /some/dir | tar xvvd - -C /dest/dir > > which of course does not explain way your version hangs, but this one is cleaner, and btw, don?t > > include /. > > that's very strange. It's working, but doesn't solve another related > problem. When i pipe the tar thru nc a have the same problem as my > version. And it's no difference if there is a tar c an the receiving end > of nc or just a '> file.tar'Maybe you are not invoking nc(1) with the -N option?>From the manual page:>>>> -N shutdown(2) the network socket after EOF on the input. Some >>>> servers require this to finish their work.I hope this helps. Regards, -- rigo http://rigo.altervista.org
On Tue, Aug 23, 2016 at 09:35:12AM +0200, Gerhard Schmidt wrote:> Am 23.08.2016 um 09:18 schrieb Daniel Braniss: > > > >> On 23 Aug 2016, at 10:06, Gerhard Schmidt <estartu at ze.tum.de> wrote: > >> > >> Hi, > >> > >> i'm quite often use tar to copy files using > >> > >> tar cf - /some/dir | (cd /dest/dir; tar xvvf - ) > > the ???new??? way: > > tar cf - /some/dir | tar xvvd - -C /dest/dir > > which of course does not explain way your version hangs, but this one is cleaner, and btw, don???t > > include /. > > that's very strange. It's working, but doesn't solve another related > problem. When i pipe the tar thru nc a have the same problem as my > version. And it's no difference if there is a tar c an the receiving end > of nc or just a '> file.tar'Is the sending side using nc -N ? If not, the sending socket is not being shut down. Regards, Gary