Welcome to MacForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

tar vs 10.3

 
   Macintosh computer (Home) -> System RSS
Next:  polish chars into terminal  
Author Message
blah blah

External


Since: Jul 23, 2003
Posts: 15



(Msg. 1) Posted: Thu Jan 20, 2005 4:40 pm
Post subject: tar vs 10.3
Archived from groups: comp>sys>mac>system (more info?)

Hi, on other flavors of Unix, I can do the following command to move a
whole file hierarchy:

% cd /dir_to_bkup
% tar cf - . | (cd /bkup/here && tar xBf -)

when I try and do this osx, it kinda works, except that I get a
boatload of errors like this:

tar: ./path_to_files: Cannot open: (null)

I am thinking that maybe this has to do with mac specific file
attributes or something...

so, does anyone know which tool I should use to do what I am trying to
accomplish?

Lastly, I am trying to move a networked directory (the file server is a
snap box) to a local firewire hd as a backup, if this matters....


thanks in advance

--

 >> Stay informed about: tar vs 10.3 
Back to top
Login to vote
Tom Harrington

External


Since: Aug 19, 2003
Posts: 1725



(Msg. 2) Posted: Thu Jan 20, 2005 4:57 pm
Post subject: Re: tar vs 10.3 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <200120051610362497%blah@blah.com>,
blah blah <blah.TakeThisOut@blah.com> wrote:

 > Hi, on other flavors of Unix, I can do the following command to move a
 > whole file hierarchy:
 >
 > % cd /dir_to_bkup
 > % tar cf - . | (cd /bkup/here && tar xBf -)
 >
 > when I try and do this osx, it kinda works, except that I get a
 > boatload of errors like this:
 >
 > tar: ./path_to_files: Cannot open: (null)
 >
 > I am thinking that maybe this has to do with mac specific file
 > attributes or something...
 >
 > so, does anyone know which tool I should use to do what I am trying to
 > accomplish?

Dunno, the command above works just fine when I try it.

What kind of files are these? Anything different about the ones that
get this error?

--
Tom "Tom" Harrington
Macaroni, Automated System Maintenance for Mac OS X.
Version 2.0: Delocalize, Repair Permissions, lots more.
See <a style='text-decoration: underline;' href="http://www.atomicbird.com/" target="_blank">http://www.atomicbird.com/</a><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: tar vs 10.3 
Back to top
Login to vote
beede

External


Since: Jan 20, 2005
Posts: 2



(Msg. 3) Posted: Thu Jan 20, 2005 7:30 pm
Post subject: Re: tar vs 10.3 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <200120051610362497%blah@blah.com>,
blah blah <blah RemoveThis @blah.com> wrote:

 > Hi, on other flavors of Unix, I can do the following command to move a
 > whole file hierarchy:
 >
 > % cd /dir_to_bkup
 > % tar cf - . | (cd /bkup/here && tar xBf -)
 >
 > when I try and do this osx, it kinda works, except that I get a
 > boatload of errors like this:
 >
 > tar: ./path_to_files: Cannot open: (null)

Try cp -R instead and see if you have the same kind of
problems. If you're really interested, run the second tar
under strace and see what it's really doing that's failing.
If it were something other than tar, I'd expect it was all
the nutty files with spaces in the names, but tar should
handle that gracefully.

Mike Beede<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: tar vs 10.3 
Back to top
Login to vote
exceptionstake

External


Since: Dec 21, 2004
Posts: 37



(Msg. 4) Posted: Thu Jan 20, 2005 8:40 pm
Post subject: Re: tar vs 10.3 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2005-01-20 17:57:08 -0500, Tom Harrington
<tph.DeleteThis@pcisys.no.spam.dammit.net> said:

 > In article <200120051610362497%blah@blah.com>,
 > blah blah <blah.DeleteThis@blah.com> wrote:
 >
  >> Hi, on other flavors of Unix, I can do the following command to move a
  >> whole file hierarchy:
  >>
  >> % cd /dir_to_bkup
  >> % tar cf - . | (cd /bkup/here && tar xBf -)
  >>
  >> when I try and do this osx, it kinda works, except that I get a
  >> boatload of errors like this:
  >>
  >> tar: ./path_to_files: Cannot open: (null)
  >>
  >> I am thinking that maybe this has to do with mac specific file
  >> attributes or something...
  >>
  >> so, does anyone know which tool I should use to do what I am trying to
  >> accomplish?
 >
 > Dunno, the command above works just fine when I try it.
 >
 > What kind of files are these? Anything different about the ones that
 > get this error?

I know that for some tools, like ditto, they fail on Locked files.
Could that be the cause?
--
"It's beyond my ken... and my Barbie, and all of my action figures."<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: tar vs 10.3 
Back to top
Login to vote
Kevin McMurtrie1

External


Since: Sep 07, 2003
Posts: 474



(Msg. 5) Posted: Thu Jan 20, 2005 10:26 pm
Post subject: Re: tar vs 10.3 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <200120051610362497%blah@blah.com>,
blah blah <blah RemoveThis @blah.com> wrote:

 > Hi, on other flavors of Unix, I can do the following command to move a
 > whole file hierarchy:
 >
 > % cd /dir_to_bkup
 > % tar cf - . | (cd /bkup/here && tar xBf -)
 >
 > when I try and do this osx, it kinda works, except that I get a
 > boatload of errors like this:
 >
 > tar: ./path_to_files: Cannot open: (null)
 >
 > I am thinking that maybe this has to do with mac specific file
 > attributes or something...
 >
 > so, does anyone know which tool I should use to do what I am trying to
 > accomplish?
 >
 > Lastly, I am trying to move a networked directory (the file server is a
 > snap box) to a local firewire hd as a backup, if this matters....
 >
 >
 > thanks in advance
 >
 > --

It could non-printable characters in filenames. OS 9 icons, for
example, have a carriage return in the filename. 'find' and 'xargs'
have a special null argument terminator mode that's required to work on
MacOS: find / -type f -print0 | xargs -0 grep foo

Try using plain mv and cp for Unix files. For meta-data rich files,
there's /Developer/Tools/MvMac and /Developer/Tools/CpMac. If your CPU
is faster than your network and you have SSH on both ends, scp with
option '-C' is the fastest way to go.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: tar vs 10.3 
Back to top
Login to vote
Greg Shenaut1

External


Since: Apr 03, 2004
Posts: 122



(Msg. 6) Posted: Thu Jan 20, 2005 10:40 pm
Post subject: Re: tar vs 10.3 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

blah blah <blah RemoveThis @blah.com> exponit:
 > Hi, on other flavors of Unix, I can do the following command to move a
 > whole file hierarchy:
 >
 > % cd /dir_to_bkup
 > % tar cf - . | (cd /bkup/here && tar xBf -)

 > when I try and do this osx, it kinda works, except that I get a
 > boatload of errors like this:
 >
 > tar: ./path_to_files: Cannot open: (null)
 >
 > I am thinking that maybe this has to do with mac specific file
 > attributes or something...
 >
 > so, does anyone know which tool I should use to do what I am trying to
 > accomplish?
 >
 > Lastly, I am trying to move a networked directory (the file server is a
 > snap box) to a local firewire hd as a backup, if this matters....

I'd suggest trying each side of the pipe separately (maybe on just
one subdirectory), because at this point you don't even know for
sure which tar is messing up. So do "tar cf /tmp/xxx ./sub/dir"
from the source directory and see if you get the errors. If not,
then cd into the target directory and do "tar xf /tmp/xxx" and see
if you get them. If this doesn't shed any light, then try some
different subdirectories.

Greg Shenaut<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: tar vs 10.3 
Back to top
Login to vote
Tom Harrington

External


Since: Aug 19, 2003
Posts: 1725



(Msg. 7) Posted: Fri Jan 21, 2005 11:08 am
Post subject: Re: tar vs 10.3 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article
<2005012018323916807%exceptionsTakeThisOutDude@earthlinknet>,
iStrain <exceptionsTakeThisOutDude RemoveThis @earthlink.net> wrote:

 > On 2005-01-20 17:57:08 -0500, Tom Harrington
 > <tph RemoveThis @pcisys.no.spam.dammit.net> said:
 >
  > > In article <200120051610362497%blah@blah.com>,
  > > blah blah <blah RemoveThis @blah.com> wrote:
  > >
   > >> Hi, on other flavors of Unix, I can do the following command to move a
   > >> whole file hierarchy:
   > >>
   > >> % cd /dir_to_bkup
   > >> % tar cf - . | (cd /bkup/here && tar xBf -)
   > >>
   > >> when I try and do this osx, it kinda works, except that I get a
   > >> boatload of errors like this:
   > >>
   > >> tar: ./path_to_files: Cannot open: (null)
   > >>
   > >> I am thinking that maybe this has to do with mac specific file
   > >> attributes or something...
   > >>
   > >> so, does anyone know which tool I should use to do what I am trying to
   > >> accomplish?
  > >
  > > Dunno, the command above works just fine when I try it.
  > >
  > > What kind of files are these? Anything different about the ones that
  > > get this error?
 >
 > I know that for some tools, like ditto, they fail on Locked files.
 > Could that be the cause?

That was actually what I expected, but some experimentation shows that
it's not the case.

--
Tom "Tom" Harrington
Macaroni, Automated System Maintenance for Mac OS X.
Version 2.0: Delocalize, Repair Permissions, lots more.
See <a style='text-decoration: underline;' href="http://www.atomicbird.com/" target="_blank">http://www.atomicbird.com/</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: tar vs 10.3 
Back to top
Login to vote
Display posts from previous:   
   Macintosh computer (Home) -> System All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]