Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.sys.mac.apps > #36678

Re: tar: Pathname too long

From Jolly Roger <jollyroger@pobox.com>
Newsgroups comp.sys.mac.apps
Subject Re: tar: Pathname too long
Date 2016-10-05 18:56 +0000
Organization People for the Ethical Treatment of Pirates
Message-ID <e5l0npFejr6U1@mid.individual.net> (permalink)
References <nt33o8$174k$1@gioia.aioe.org> <nt3h9q$1vbc$1@gioia.aioe.org>

Show all headers | View raw


On 2016-10-05, Robert Peirce <bob@peirce-family.com> wrote:
> On 10/5/16 10:46 AM, Robert Peirce wrote:
>> Okay.  I've been here before but the problem still exists and I don't
>> know why.  Doe anybody have a suggestion to get around this problem?
>>
>>
>> Here is one of the output lines:
>>
>> tar: ./Podcasts/Reason Podcast/Richard Epstein_ Why Obamacare Is
>> Collapsing and He's Not Voting for Trump, Hillary, _or_ Johnson.mp3:
>> Pathname too long
>>
>> Last time everybody agreed that there is no such thing as a too long
>> pathname in tar itself so I thought maybe there is something in the
>> command line doing it.  Tar is a symbolic link to bsdtar, and bsdtar is
>> timestamped 03/12/16.
>>
>> In this line TS is a timestamp file updated after each backup.  If the
>> problem is not in tar (bsdtar), find or exec could be causing it.
>>
>>         find . -type f -mnewer ../TS -exec tar -rf ~/media.t {} \;
>
> The problem seems to be the "-type f" argument.  Without that it works. 
> With it it fails.  Why?

These file names are extremely long, right? Maybe the entire command
line, including that argument, is too long. What happens if you remove
the "-type f" argument, but add another of similar length, like
"-print0"? If that also fails, then you're probably dealing with a shell
command line length issue. If so, you may want to try using xargs rather
than the -exec switch.

> I would still like to know why this doesn't work as expected and any way 
> to work around it.

Welcome to shell hell. Rewrite the script in something higher level like
PHP, Ruby, etc, and my bet is this issue will simply vanish into thin
air.

-- 
E-mail sent to this address may be devoured by my ravenous SPAM filter.
I often ignore posts from Google. Use a real news client instead.

JR

Back to comp.sys.mac.apps | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-05 10:46 -0400
  Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-05 13:08 -0400
  Re: tar: Pathname too long Jolly Roger <jollyroger@pobox.com> - 2016-10-05 17:29 +0000
  Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-05 14:37 -0400
    Re: tar: Pathname too long Jolly Roger <jollyroger@pobox.com> - 2016-10-05 18:56 +0000
  Re: tar: Pathname too long Lewis <g.kreme@gmail.com.dontsendmecopies> - 2016-10-05 20:22 +0000
  Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-05 19:35 -0400
    Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-11 13:07 -0400
      Re: tar: Pathname too long Jolly Roger <jollyroger@pobox.com> - 2016-10-11 17:15 +0000
        Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-11 14:57 -0400
          Re: tar: Pathname too long Jolly Roger <jollyroger@pobox.com> - 2016-10-11 19:22 +0000
        Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-11 14:57 -0400
          Re: tar: Pathname too long Jolly Roger <jollyroger@pobox.com> - 2016-10-11 19:22 +0000
            Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-13 10:13 -0400
              Re: tar: Pathname too long Jolly Roger <jollyroger@pobox.com> - 2016-10-13 15:09 +0000
              Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-13 11:17 -0400
                Re: tar: Pathname too long Barry Margolin <barmar@alum.mit.edu> - 2016-10-13 11:43 -0400
                Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-13 15:43 -0400
                Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-13 18:00 -0400
                Re: tar: Pathname too long Jolly Roger <jollyroger@pobox.com> - 2016-10-13 22:01 +0000
  Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-14 09:05 -0400
    Re: tar: Pathname too long Barry Margolin <barmar@alum.mit.edu> - 2016-10-14 10:55 -0400
      Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-14 11:15 -0400
        Re: tar: Pathname too long Jolly Roger <jollyroger@pobox.com> - 2016-10-14 15:52 +0000
        Re: tar: Pathname too long Barry Margolin <barmar@alum.mit.edu> - 2016-10-14 12:48 -0400
          Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-14 13:11 -0400
            Re: tar: Pathname too long "Happy.Hobo" <Happy.Hobo@Spam.Invalid> - 2016-10-14 23:06 -0500
              Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-15 11:44 -0400
          Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-14 13:14 -0400
          Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-14 17:12 -0400
            Re: tar: Pathname too long "Happy.Hobo" <Happy.Hobo@Spam.Invalid> - 2016-10-14 23:08 -0500
              Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-15 11:52 -0400
            Re: tar: Pathname too long rlhamil@smart.net (Richard L. Hamilton) - 2016-10-16 08:43 +0000
              Re: tar: Pathname too long "Happy.Hobo" <Happy.Hobo@Spam.Invalid> - 2016-10-16 16:43 -0500
                Re: tar: Pathname too long rlhamil@smart.net (Richard L. Hamilton) - 2016-10-17 17:46 +0000
                Re: tar: Pathname too long Paul Sture <nospam@sture.ch> - 2016-10-18 06:39 +0200
                Re: tar: Pathname too long dempson@actrix.gen.nz (David Empson) - 2016-10-18 20:39 +1300
                Re: tar: Pathname too long "Happy.Hobo" <Happy.Hobo@Spam.Invalid> - 2016-10-18 12:20 -0500
                Re: tar: Pathname too long dempson@actrix.gen.nz (David Empson) - 2016-10-19 09:15 +1300
                Re: tar: Pathname too long nospam <nospam@nospam.invalid> - 2016-10-18 16:37 -0400
                Re: tar: Pathname too long "Happy.Hobo" <Happy.Hobo@Spam.Invalid> - 2016-10-19 00:26 -0500
                Re: tar: Pathname too long dempson@actrix.gen.nz (David Empson) - 2016-10-19 23:02 +1300
                Re: tar: Pathname too long "Happy.Hobo" <Happy.Hobo@Spam.Invalid> - 2016-10-19 18:02 -0500
                Re: tar: Pathname too long dempson@actrix.gen.nz (David Empson) - 2016-10-20 14:06 +1300
                Re: tar: Pathname too long "Happy.Hobo" <Happy.Hobo@Spam.Invalid> - 2016-10-19 22:57 -0500
                Re: tar: Pathname too long dempson@actrix.gen.nz (David Empson) - 2016-10-20 17:47 +1300
                Re: tar: Pathname too long Jolly Roger <jollyroger@pobox.com> - 2016-10-20 15:23 +0000
                Re: tar: Pathname too long nospam <nospam@nospam.invalid> - 2016-10-19 08:38 -0400
                Re: tar: Pathname too long Barry Margolin <barmar@alum.mit.edu> - 2016-10-19 11:31 -0400
                Re: tar: Pathname too long nospam <nospam@nospam.invalid> - 2016-10-19 11:38 -0400
                Re: tar: Pathname too long Barry Margolin <barmar@alum.mit.edu> - 2016-10-19 11:49 -0400
                Re: tar: Pathname too long nospam <nospam@nospam.invalid> - 2016-10-19 12:09 -0400
                Re: tar: Pathname too long Peter Köhlmann <peter-koehlmann@t-online.de> - 2016-10-19 18:22 +0200
                Re: tar: Pathname too long nospam <nospam@nospam.invalid> - 2016-10-19 12:33 -0400
                Re: tar: Pathname too long Peter Köhlmann <peter-koehlmann@t-online.de> - 2016-10-19 18:44 +0200
                Re: tar: Pathname too long nospam <nospam@nospam.invalid> - 2016-10-19 12:58 -0400
                Re: tar: Pathname too long Lewis <g.kreme@gmail.com.dontsendmecopies> - 2016-10-20 04:25 +0000
                Re: tar: Pathname too long "Happy.Hobo" <Happy.Hobo@Spam.Invalid> - 2016-10-21 20:16 -0500
                Re: tar: Pathname too long Jolly Roger <jollyroger@pobox.com> - 2016-10-19 15:47 +0000
                Re: tar: Pathname too long Jolly Roger <jollyroger@pobox.com> - 2016-10-19 15:40 +0000
                Re: tar: Pathname too long "Happy.Hobo" <Happy.Hobo@Spam.Invalid> - 2016-10-19 18:06 -0500
                Re: tar: Pathname too long Jolly Roger <jollyroger@pobox.com> - 2016-10-20 00:15 +0000
                Re: tar: Pathname too long "Happy.Hobo" <Happy.Hobo@Spam.Invalid> - 2016-10-19 22:58 -0500
                Re: tar: Pathname too long nospam <nospam@nospam.invalid> - 2016-10-20 08:19 -0400
                Re: tar: Pathname too long Jolly Roger <jollyroger@pobox.com> - 2016-10-20 14:21 +0000
                Re: tar: Pathname too long "Happy.Hobo" <Happy.Hobo@Spam.Invalid> - 2016-10-21 20:23 -0500
      Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-14 12:33 -0400
    Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-14 11:03 -0400
      Re: tar: Pathname too long Jolly Roger <jollyroger@pobox.com> - 2016-10-14 15:53 +0000
        Re: tar: Pathname too long Robert Peirce <bob@peirce-family.com> - 2016-10-14 12:56 -0400

csiph-web