Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.mac.apps > #36674 > unrolled thread

tar: Pathname too long

Started byRobert Peirce <bob@peirce-family.com>
First post2016-10-05 10:46 -0400
Last post2016-10-14 12:56 -0400
Articles 20 on this page of 73 — 10 participants

Back to article view | Back to comp.sys.mac.apps


Contents

  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 Jolly Roger <jollyroger@pobox.com> - 2016-10-22 04:26 +0000
                                          Re: tar: Pathname too long "Happy.Hobo" <Happy.Hobo@Spam.Invalid> - 2016-10-22 16:53 -0500
                                            Re: tar: Pathname too long Jolly Roger <jollyroger@pobox.com> - 2016-10-22 22:14 +0000
        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

Page 1 of 4  [1] 2 3 4  Next page →


#36674 — tar: Pathname too long

FromRobert Peirce <bob@peirce-family.com>
Date2016-10-05 10:46 -0400
Subjecttar: Pathname too long
Message-ID<nt33o8$174k$1@gioia.aioe.org>
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 {} \;






To confirm what was expressed the last time, the following command line 
works fine:

tar -rf ./junk "./Podcasts/Reason Podcast/Richard Epstein_ Why Obamacare 
Is Collapsing and He's Not Voting for Trump, Hillary, _or_ Johnson.mp3"

The quotes protect the file name from the shell and are not necessary in 
the script I am using.  Numerous files in media.t have spaces and other 
special characters.

[toc] | [next] | [standalone]


#36675

FromRobert Peirce <bob@peirce-family.com>
Date2016-10-05 13:08 -0400
Message-ID<nt3c3a$1ljc$1@gioia.aioe.org>
In reply to#36674
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 {} \;
>
>

This also works, but I have no idea why it works in this case but not in 
the broader context..

  find "./Podcasts/Reason Podcast/Richard Epstein_ Why Obamacare Is 
Collapsing and He's Not Voting for Trump, Hillary, _or_ Johnson.mp3" 
-exec tar -rf test.t {} \;

[toc] | [prev] | [next] | [standalone]


#36676

FromJolly Roger <jollyroger@pobox.com>
Date2016-10-05 17:29 +0000
Message-ID<e5krkfFbi55U5@mid.individual.net>
In reply to#36674
On 2016-10-05, Robert Peirce <bob@peirce-family.com> 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?

I'm pretty sure if you rewrite your script in something other than
shell, this problem will magically vanish.

-- 
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

[toc] | [prev] | [next] | [standalone]


#36677

FromRobert Peirce <bob@peirce-family.com>
Date2016-10-05 14:37 -0400
Message-ID<nt3h9q$1vbc$1@gioia.aioe.org>
In reply to#36674
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?

With files you get the whole tree and the directories and 
sub-directories get created as needed.  Without -f you get a lot of 
garbage I don't need.  It greatly reduces available disk space, maybe 
too much.

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

[toc] | [prev] | [next] | [standalone]


#36678

FromJolly Roger <jollyroger@pobox.com>
Date2016-10-05 18:56 +0000
Message-ID<e5l0npFejr6U1@mid.individual.net>
In reply to#36677
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

[toc] | [prev] | [next] | [standalone]


#36679

FromLewis <g.kreme@gmail.com.dontsendmecopies>
Date2016-10-05 20:22 +0000
Message-ID<slrnnvao9g.4ao.g.kreme@snow.local>
In reply to#36674
In message <nt33o8$174k$1@gioia.aioe.org> 
  Robert Peirce <bob@peirce-family.com> 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

Try it without the ' or with it properly escaped.

-- 
No sense being pessimistic. It wouldn't work anyway.

[toc] | [prev] | [next] | [standalone]


#36680

FromRobert Peirce <bob@peirce-family.com>
Date2016-10-05 19:35 -0400
Message-ID<nt42ok$s3f$1@gioia.aioe.org>
In reply to#36674
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 {} \;

Got this from Google.

This construct produces the usual error:

find ./$i -newer TS -type f -print0 | tar --null -n -rf  ~/pictures.t -T -

This one doesn't except after building the correct file it ends by 
deleting it contents:

find ./$i -newer TS -type f -print0 | tar --null -n -cf  ~/pictures.t -T -

The only difference is the first uses -r and the second uses -c.  The 
second is sooooo close!

[toc] | [prev] | [next] | [standalone]


#36870

FromRobert Peirce <bob@peirce-family.com>
Date2016-10-11 13:07 -0400
Message-ID<ntj68e$ssh$1@gioia.aioe.org>
In reply to#36680
On 10/5/16 7:35 PM, Robert Peirce wrote:
> Got this from Google.
>
> This construct produces the usual error:
>
> find ./$i -newer TS -type f -print0 | tar --null -n -rf  ~/pictures.t -T -
>
> This one doesn't except after building the correct file it ends by
> deleting it contents:
>
> find ./$i -newer TS -type f -print0 | tar --null -n -cf  ~/pictures.t -T -


I was hoping somebody might be able to explain what is going on here. 
The -r flag produces the file name too long error.  The -c flag does not 
but it deletes the file on completion.

As near as I could tell before deletion, the two files were the same. 
So, is there a way to prevent -c from deleting the file?

[toc] | [prev] | [next] | [standalone]


#36871

FromJolly Roger <jollyroger@pobox.com>
Date2016-10-11 17:15 +0000
Message-ID<e64l15F626cU1@mid.individual.net>
In reply to#36870
On 2016-10-11, Robert Peirce <bob@peirce-family.com> wrote:
> On 10/5/16 7:35 PM, Robert Peirce wrote:
>> Got this from Google.
>>
>> This construct produces the usual error:
>>
>> find ./$i -newer TS -type f -print0 | tar --null -n -rf  ~/pictures.t -T -
>>
>> This one doesn't except after building the correct file it ends by
>> deleting it contents:
>>
>> find ./$i -newer TS -type f -print0 | tar --null -n -cf  ~/pictures.t -T -
>
>
> I was hoping somebody might be able to explain what is going on here. 

I gave some suggestions, but you never even responded. Oh well.

-- 
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

[toc] | [prev] | [next] | [standalone]


#36872

FromRobert Peirce <bob@peirce-family.com>
Date2016-10-11 14:57 -0400
Message-ID<ntjclr$1fuk$1@gioia.aioe.org>
In reply to#36871
On 10/11/16 1:15 PM, Jolly Roger wrote:
> I gave some suggestions, but you never even responded. Oh well.
>

You suggested I re-write the script in a higher level language, but I 
decided I couldn't do that without recreating tar somehow and I didn't 
think I could do that.  So I looked for other ways of doing the job in 
shell and discovered the -r and -c flags behaved other than expected.  I 
decided if I could figure out why that was or, better yet, how to keep 
-c from deleting the file, it might solve my problem.

The weird thing is everybody says the length of the name shouldn't 
matter to tar but that seems to be true in most cases but not all.

[toc] | [prev] | [next] | [standalone]


#36874

FromJolly Roger <jollyroger@pobox.com>
Date2016-10-11 19:22 +0000
Message-ID<e64sfcF6f1bU3@mid.individual.net>
In reply to#36872
On 2016-10-11, Robert Peirce <bob@peirce-family.com> wrote:
> On 10/11/16 1:15 PM, Jolly Roger wrote:
>> I gave some suggestions, but you never even responded. Oh well.
>>
>
> You suggested I re-write the script in a higher level language, but I 
> decided I couldn't do that without recreating tar somehow and I didn't 
> think I could do that.

There's no reason you can't still use tar in a PHP/Perl/whatever script.

-- 
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

[toc] | [prev] | [next] | [standalone]


#36873

FromRobert Peirce <bob@peirce-family.com>
Date2016-10-11 14:57 -0400
Message-ID<ntjcnd$1fuk$2@gioia.aioe.org>
In reply to#36871
On 10/11/16 1:15 PM, Jolly Roger wrote:
> I gave some suggestions, but you never even responded. Oh well.
>

You also suggested using print0 and that rally did seem to get me a step 
closer.

[toc] | [prev] | [next] | [standalone]


#36875

FromJolly Roger <jollyroger@pobox.com>
Date2016-10-11 19:22 +0000
Message-ID<e64sgaF6f1bU4@mid.individual.net>
In reply to#36873
On 2016-10-11, Robert Peirce <bob@peirce-family.com> wrote:
> On 10/11/16 1:15 PM, Jolly Roger wrote:
>> I gave some suggestions, but you never even responded. Oh well.
>
> You also suggested using print0 and that rally did seem to get me a step 
> closer.

You missed what I wrote about using xargs rather than the -exec switch.

-- 
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

[toc] | [prev] | [next] | [standalone]


#36887

FromRobert Peirce <bob@peirce-family.com>
Date2016-10-13 10:13 -0400
Message-ID<nto4r5$sv8$1@gioia.aioe.org>
In reply to#36875
On 10/11/16 3:22 PM, Jolly Roger wrote:
> You missed what I wrote about using xargs rather than the -exec switch.
>

I didn't miss it.  I just recalled I had read there was some sort of 
problem with xargs so I chose not to pursue it.  However, I will give it 
a look.

[toc] | [prev] | [next] | [standalone]


#36888

FromJolly Roger <jollyroger@pobox.com>
Date2016-10-13 15:09 +0000
Message-ID<e69mdnFchb8U1@mid.individual.net>
In reply to#36887
On 2016-10-13, Robert Peirce <bob@peirce-family.com> wrote:
> On 10/11/16 3:22 PM, Jolly Roger wrote:
>> You missed what I wrote about using xargs rather than the -exec switch.
>
> I didn't miss it.  I just recalled I had read there was some sort of 
> problem with xargs so I chose not to pursue it.

No idea what you are talking about, but that's no reason to avoid it.
People everywhere on many platforms use xargs all the time without
issue.

> However, I will give it a look.

You really should, since it has a decent chance of resolving your issue
for good.
 
-- 
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

[toc] | [prev] | [next] | [standalone]


#36889

FromRobert Peirce <bob@peirce-family.com>
Date2016-10-13 11:17 -0400
Message-ID<nto8hk$151g$1@gioia.aioe.org>
In reply to#36887
On 10/13/16 10:13 AM, Robert Peirce wrote:
> I didn't miss it.  I just recalled I had read there was some sort of
> problem with xargs so I chose not to pursue it.  However, I will give it
> a look.

I know almost noting about xargs, but I tried this:

find ./iTunes -newer TS -type f -print0 |
xargs -O tar -cf ~/iTunes.t

and got the following error:

xargs: insufficient space for argument

I'm assuming the argument is the file name I am trying to tar, but maybe 
not.

I also got the error with 'tar -rf.

I searched google and found this alternate approach:

xargs -O -Ifoo tar cf ~/iTunes.t foo

I also tried '{}' instead of 'foo'.  Both produced the insufficient 
space error.

Using -L 1 doesn't eliminate the error either.

I am stymied.

[toc] | [prev] | [next] | [standalone]


#36890

FromBarry Margolin <barmar@alum.mit.edu>
Date2016-10-13 11:43 -0400
Message-ID<barmar-70A3C6.11431813102016@88-209-239-213.giganet.hu>
In reply to#36889
In article <nto8hk$151g$1@gioia.aioe.org>,
 Robert Peirce <bob@peirce-family.com> wrote:

> On 10/13/16 10:13 AM, Robert Peirce wrote:
> > I didn't miss it.  I just recalled I had read there was some sort of
> > problem with xargs so I chose not to pursue it.  However, I will give it
> > a look.
> 
> I know almost noting about xargs, but I tried this:
> 
> find ./iTunes -newer TS -type f -print0 |
> xargs -O tar -cf ~/iTunes.t
> 
> and got the following error:
> 
> xargs: insufficient space for argument
> 
> I'm assuming the argument is the file name I am trying to tar, but maybe 
> not.
> 
> I also got the error with 'tar -rf.
> 
> I searched google and found this alternate approach:
> 
> xargs -O -Ifoo tar cf ~/iTunes.t foo
> 
> I also tried '{}' instead of 'foo'.  Both produced the insufficient 
> space error.
> 
> Using -L 1 doesn't eliminate the error either.
> 
> I am stymied.

What does

find ./iTunes -type f | awk '{print length($0), $0}' | sort -nr | head -1

print? This will find the longest filename in the folder.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

[toc] | [prev] | [next] | [standalone]


#36892

FromRobert Peirce <bob@peirce-family.com>
Date2016-10-13 15:43 -0400
Message-ID<ntoo4a$5jv$1@gioia.aioe.org>
In reply to#36890
On 10/13/16 11:43 AM, Barry Margolin wrote:
> find ./iTunes -type f | awk '{print length($0), $0}' | sort -nr | head -1
>
> print? This will find the longest filename in the folder.
>

I already know that.  it is 161 characters.  That's not the problem.  It 
really should work.  I am going to look for a typo.  I've been known to 
miss-type commands in the past.

[toc] | [prev] | [next] | [standalone]


#36893

FromRobert Peirce <bob@peirce-family.com>
Date2016-10-13 18:00 -0400
Message-ID<ntp06n$hts$1@gioia.aioe.org>
In reply to#36889
On 10/13/16 11:17 AM, Robert Peirce wrote:
> On 10/13/16 10:13 AM, Robert Peirce wrote:
>> I didn't miss it.  I just recalled I had read there was some sort of
>> problem with xargs so I chose not to pursue it.  However, I will give it
>> a look.
>
> I know almost noting about xargs, but I tried this:
>
> find ./iTunes -newer TS -type f -print0 |
> xargs -O tar -cf ~/iTunes.t

I found a typo in the script.  It now works.  Thanks JR.

I created two tar files using the old and new method and compared the 
output.  It looked good and there was no problem with file name length.

[toc] | [prev] | [next] | [standalone]


#36894

FromJolly Roger <jollyroger@pobox.com>
Date2016-10-13 22:01 +0000
Message-ID<e6aehmFib48U1@mid.individual.net>
In reply to#36893
On 2016-10-13, Robert Peirce <bob@peirce-family.com> wrote:
> On 10/13/16 11:17 AM, Robert Peirce wrote:
>> On 10/13/16 10:13 AM, Robert Peirce wrote:
>>> I didn't miss it.  I just recalled I had read there was some sort of
>>> problem with xargs so I chose not to pursue it.  However, I will give it
>>> a look.
>>
>> I know almost noting about xargs, but I tried this:
>>
>> find ./iTunes -newer TS -type f -print0 |
>> xargs -O tar -cf ~/iTunes.t
>
> I found a typo in the script.  It now works.  Thanks JR.
>
> I created two tar files using the old and new method and compared the 
> output.  It looked good and there was no problem with file name length.

Yey! Finally!

-- 
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

[toc] | [prev] | [next] | [standalone]


Page 1 of 4  [1] 2 3 4  Next page →

Back to top | Article view | comp.sys.mac.apps


csiph-web