HP3000-L Archives

August 2013, Week 5

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Donna Hofmeister <[log in to unmask]>
Reply To:
Donna Hofmeister <[log in to unmask]>
Date:
Thu, 29 Aug 2013 07:13:45 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (85 lines)
On Thu, Aug 29, 2013 at 6:40 AM, Turner, Jill <[log in to unmask]>wrote:

> I am trying to copy some files (an example of one below) in the unix shell
> on an HP3000 so when they all get FTP'd to a network server they have the
> date
> and time on the end of the file name to save overwriting. I believe the
> sytntax below is ok as it comes back with the write information but doesn't
> actually do the copy
> as I get the "Implementation-defined error" message.
>
> Can anyone help pr is there a better way of doing this
>
> Many Thanks Jill
>
> shell/iX> cp BOUNCREP BOUNCREP_`date +'%Y%m%d%H%M'`
> cp: Error copying file BOUNCREP to BOUNCREP_201308291312:
> Implementation-defined error
>

one feels compelled to ask why you're doing this in the shell...as there is
nothing particularly magical about copying a normal mpe file to a file with
a hfs-name.

anyhow...

i believe the issue is the length of the resulting file name.  here's some
examples:

/SYS/PUB $ ll D2*
-rwxr-xr-x   1 MANAGER.SYS       SYS            0 Aug 29 06:53 D2345678

the above file name is eight characters long.  now to replicate your
command:

/SYS/PUB $ cp D2345678 D2345678_`date +'%Y%m%d%H%M'`
cp: Error copying file D2345678 to D2345678_201308290654:
Implementation-defined  error
/SYS/PUB $

same problem.  the issue is -- hfs-named file that are under a mpe
directory structure (eg, a group) have a limit of 16 characters in the file
name.

let's make a file whose name is four characters long (to skip over 7,6 and
5 :-) and try to redo the copy to see what happens:

/SYS/PUB $ touch d234
/SYS/PUB $ cp d234 d234_`date +'%Y%m%d%H%M'`
cp: target file "d234_201308290655": Filename too long

at least this time the error message makes some sense!

so let's do just three characters:

/SYS/PUB $ touch d23
/SYS/PUB $ cp d23 d23_`date +'%Y%m%d%H%M'`
/SYS/PUB $ ll d23*
-rw-rw----   1 MANAGER.SYS       SYS            0 Aug 29 06:55 d23
-rw-rw----   1 MANAGER.SYS       SYS            0 Aug 29 06:55 d234
-rw-rw----   1 MANAGER.SYS       SYS            0 Aug 29 06:55
d23_201308290655

 ah ha!

so what to do?
1. do the rename as you're doing the put.  you'll need to create a stdin
file for your ftp (but hopefully you're doing this already anyhow).  when
you're making this file, you can do something like:
    echo put bouncerep bouncerep_!hpyyyymmdd>>*mystdin
2. if you have to keep the long-named copy on your mpe box, create a
subdirectory.  the rules for filename lengths change considerably when the
'owning' directory structure is also hfs.
3. shorten the copy-to filename to make the total number of characters be
16 or fewer characters

hth           - donna

-- 
Donna Hofmeister
Allegro Consultants, Inc.
408-252-2330

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2