Can not open file

Hi Gurus

I am getting below error while opening a shar file

dybip15 $ ls -lrt
total 41851634
----------   1 prdur      prdur          122 Jan  1  1970 @LongLink
-rwxr-x---   1 prdur      prdur      2039152640 May  3 22:03 Hemel_CAR_data.tar
-rwxr-x---   1 prdur      prdur      3034818560 May  4 12:56 Skyport_CAR_data.tar
-rw-r--r--   1 prdur      prdur      798474240 May  9 13:42 UDRG-output-and-config.tar
drwxr-x---   3 prdur      prdur         1024 May 10 13:28 udrg
drwxr-x---   3 prdur      prdur           96 May 10 13:28 locid
drwxr-x---   3 prdur      prdur         1024 May 10 13:29 udrgr
-rwxr-xr-x   1 prdur      prdur      15555411132 May 28 15:38 revenueassurance.shar
drwxr-x---   3 prdur      prdur         1024 May 28 15:49 udrgc
-rw-r-----   1 prdur      prdur       132790 May 28 16:33 test.shar
drwxr-x---   2 prdur      prdur         1024 May 28 16:46 geneva
dybip15 $ sh revenueassurance.shar
sh: revenueassurance.shar: Cannot find or open the file.

The file is there and owned by my own user. :wall:

That's a 15-gigabyte script file..? :eek:. How much memory do you have?

Basically it is an shared archive.... I know bad choice but is it failing for memory? physical memory is around 3 GB.....

Some systems only allow special 64-bit executables to open files larger than 4 gigs, I suspect your OS may be one of them.

It's not a shared archive, its a shell archive.
See man shar . It's one of those commands that used to be taught on training courses and nobody ever uses. There are much better ways of moving data.

What you you get for:

ls -lad revenueassurance.shar

Please check your directory does not contain any files with funny characters. The sed is designed to make funny characters visible.

ls -la | sed -n l

I too would be very surprised if a shar file can exceeed 2 Gb .
Also your sh must be a proper Bourne Shell.
What Operating System and version is this?

What was the command used to create the .shar file?

If I recall correctly, HP sometimes shipped support files in the form shell archives.

This error message is probably coming from a read statement inside the .shar file. It probably writes a file somewhere that it tries to read afterwards.. Perhaps it tries to write in an tmp directory and there is not enough room, or perhaps one needs to be in user writeable directory before unshar'ing the file? You would need to look inside the .shar file to be sure...

I would second Scrutinizer. The error seems more to be output of the shar rather than because of the shar file is not being found.

Still, if you want to have a check and just to ensure that it's not happening because of the trailing space or something, you can take help of find command:

cd /to/the/dir
find . -name "*r*e.shar*" -exec sh '{}' ';'
# considering you have no other file with shar extension that has "r" and "e" in its name
# I see only test.shar the other shar file in the directory :)

here's my two cents:

1) it is a SHAR - (SH)ell (AR)chive - file ... that's for sure - so "sharing" simply does not apply to it . It is a form of archiving - not sharing ;

2) make sure your HP-UX is 11.31 (64bits) ;

  • try :
$ uname -a

3) make sure the filesystem containing your ".shar" file has "LARGEFILES" enabled ;

  • try :
$ cd <parent-directory>
$ bdf .
  • now take note of the LVOL name (first string) and grep it out of /etc/fstab ;

  • then check the fstab line just output for the strings "largefiles"

4) make sure the filesystem containing your "shar" has plenty of free space for the extraction (at least 110% the size of the shar file) ;

  • hint : the output of the `bdf' above tells it.

5) last, but not even a bit least - check if the shell being used for the extraction is a 64bit executable ;

  • if you pass OK all tests above, you'll be able to extract your "shar" stuff ;

HTH

good luck, and success !
_____________________________________
alexandre botao
(progsmith, polymath, ideator)
"comets never dodge"