Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.mac.apps > #36907
| From | Robert Peirce <bob@peirce-family.com> |
|---|---|
| Newsgroups | comp.sys.mac.apps |
| Subject | Re: tar: Pathname too long |
| Date | 2016-10-14 12:56 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <ntr2o8$1kac$1@gioia.aioe.org> (permalink) |
| References | <nt33o8$174k$1@gioia.aioe.org> <ntql6d$se2$1@gioia.aioe.org> <ntqs4r$18ik$1@gioia.aioe.org> <e6cdc2F1qkeU2@mid.individual.net> |
On 10/14/16 11:53 AM, Jolly Roger wrote:
> What exactly are you trying to accomplish with this script? What's its
> purpose?
>
I have two Drobo file systems, one in PA and one in VA. They are not
connected to one another in any way. The only common factor is the MBP
I put a tar file on to take to VA. I add to the PA system, mostly new
tunes in iTunes, when I am in PA and I build a tar file of changes,
newer than TS, to take to VA to keep the two systems synched.
The approach I am using works fine except, in the previous version, I
would occasionally get a "tar: Pathname too long" error and in the new
version, using xargs, "xargs: Pathname too long." You suggested using
xargs and that is probably why I was finally able to solve this.
The script processes a LIST of directories on my "Pictures" disk. After
much testing I finally discovered that if LIST began with iTunes the
script worked, but if iTunes was in the middle of the list it would fail
on a couple of really long file names; one was 161 characters.
It was suggested that the iTunes directory might have a problem
appending to an existing tar file, so I tested that to be sure it wasn't
the problem.
This may be a shell problem or a system problem. I don't know. I have
tried #!/bin/sh, #!/bin/ksh and #!/bin/bash and they all do it, so it
isn't one particular shell.
Putting iTunes first in the LIST solves the problem but I don't know why.
At the risk of adding a lot of extraneous junk, here is the working
script I am currently using. I have no idea why putting iTunes first in
the LIST makes it work correctly.
# pictures
# build and extract photographs, iPhone and movies
if [ ! "`ls /volumes/Pictures`" ]
then
print Pictures not mounted
exit
fi
if [ $# -ne 1 ]
then
echo "useage: pictures -b|-x|-t"
echo " -b = build"
echo " -x = extract"
echo " -t = test"
exit
fi
if [ "$1" != "-b" -a "$1" != "-x" -a "$1" != "-t" ]
then
echo "useage: pictures -b|-x|-t"
echo " -b = build"
echo " -x = extract"
echo " -t = test"
exit
fi
LIST="iTunes 35mmNegativeScans Ada AdaAndDeclan APOD Declan
iPhone.photoslibrary Miscellaneous Movies ScannedImages Tests
ThingsThatGo Weddings Wintergreen"
cd /Volumes/Pictures/iTunes/Mobile\ Applications
ls>AppList
cd /Volumes/Pictures/
if [ "$1" != "-x" ]
then
ls -l /volumes/Pictures/TS
printf "Is the date on /volumes/Pictures/TS set the way you want it? "
read ans
if [[ "$ans" != "Y" && "$ans" != "y" ]]
then
print Set TS and run again.
exit
fi
rm -f ~/pictures.t
for i in $LIST
do
find ./$i -type f -newer TS -print0 |
xargs -0 tar -rf ~/pictures.t
done
elif [ "$1" == "-x" ]
then
if [ -f ~/pictures.t ]
then
tar xf ~/pictures.t
print pictures.t was not removed
print remove manually
else
print There is no pictures.t file
exit
fi
else
echo "useage: pictures -b|-x|-t"
echo " -b = build"
echo " -x = extract"
echo " -t = test"
exit
fi
if [ "$1" == "-b" ]
then
rm TS
I=`date -v-3m "+%y%m%d"`
touch -t ${I}2359 TS
fi
Back to comp.sys.mac.apps | Previous | Next — Previous in thread | Find similar
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
csiph-web