Can not open file


 
Thread Tools Search this Thread
Operating Systems HP-UX Can not open file
# 1  
Old 05-28-2012
Error Can not open file

Hi Gurus

I am getting below error while opening a shar file


Code:
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. Smilie
# 2  
Old 05-28-2012
That's a 15-gigabyte script file..? Smilie. How much memory do you have?
# 3  
Old 05-28-2012
Basically it is an shared archive.... I know bad choice but is it failing for memory? physical memory is around 3 GB.....
# 4  
Old 05-28-2012
Some systems only allow special 64-bit executables to open files larger than 4 gigs, I suspect your OS may be one of them.
# 5  
Old 05-28-2012
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:
Code:
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.
Code:
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?
# 6  
Old 05-28-2012
If I recall correctly, HP sometimes shipped support files in the form shell archives.
# 7  
Old 05-28-2012
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...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk can't open file; file merge attempt

Dear all, I have an AWK related issue. I have two data files; the first, FileA has fewer lines, the second, FileB has more. FileA is a subset of FileB . Both files are tab delimited. What I want to do? When the first two columns for FileA match the first two columns of FileB, I want to... (4 Replies)
Discussion started by: A_Human_Person
4 Replies

2. Shell Programming and Scripting

Newbie.. Find if a file exists and open, if not create the desired file..

Hey all, I'm brand new to script writing, I'm wanting to make a script that will ask for a file and then retrieve that file if it exists, and if it doesn't exist, create the file with the desired name, and I'm completely stuck.. so far.. #! bin/bash echo "Enter desired file" read "$file" if ... (5 Replies)
Discussion started by: Byrang
5 Replies

3. Shell Programming and Scripting

fatal: cannot open file `TNAME' for reading (No such file or directory)

Hi, I am running this command through a shell script and getting the error mentioned in the subject line: testing.awk -f x.txt TNAME My testing.awk file contains something like ++++++++++++++++++ #!/usr/bin/awk -f BEGIN{ TAB_NAME="INSERT_ONE_" ARGV ; } if ( $1=="JAM_ONE" &&... (1 Reply)
Discussion started by: kunwar
1 Replies

4. Solaris

Before I delete any file in Unix, How can I check no open file handle is pointing to that file?

I know how to check if any file has a unix process using a file by looking at 'lsof <fullpath/filename>' command. I think using lsof is very expensive. Also to make it accurate we need to inlcude fullpath of the file. Is there another command that can tell if a file has a truely active... (12 Replies)
Discussion started by: kchinnam
12 Replies

5. Red Hat

libodbc.so.1: cannot open shared object file: No such file or directory

We are trying to install third party software on this unix server... Here is the error message we are getting... error while loading shared libraries: libodbc.so.1: cannot open shared object file: No such file or directory It seems like odbc driver is not installed... >rpm -q unixODBC... (1 Reply)
Discussion started by: govindts
1 Replies

6. Red Hat

cannot set user id: Resource temporarily unavailable (not open file/open process related)

First post, sorry to be a bother but this one has been dogging me. I have a process user (java application server) that trips a resource limit every couple weeks and need help finding what limit we're hitting. First, this is what's running: This is the error when jobs are run or the... (0 Replies)
Discussion started by: Katahdin
0 Replies

7. Programming

Some how the open(file,flag, acc) returns 0 and write to the screen, instead of the file ???

I am out of idea what to do to resolve the problem! I need to use the open(file, for.., access) function to write a file. Never have the situation like that: it is return 0 - zero. As a result all write(..) going to the screen! What the problem it could be? I do not even know... (2 Replies)
Discussion started by: alex_5161
2 Replies

8. Programming

libRmath.so: cannot open shared object file: No such file or directory

% locate Rmath /m/backup/backup/lib/R/include/Rmath.h /usr/lib/R/include/Rmath.h % gcc -g -o stand stand.c -I/usr/lib/R/include/ -lRmath -lm % ./stand ./stand: error while loading shared libraries: libRmath.so: cannot open shared object file: No such file or directory What's the trouble... (6 Replies)
Discussion started by: cdbug
6 Replies

9. UNIX for Dummies Questions & Answers

how to open a text file by double clicking on the file name in gtk+

how to open a text file by double clicking on the file name shown in a label widget in gtk+. thanks (0 Replies)
Discussion started by: cy163
0 Replies

10. UNIX for Dummies Questions & Answers

file activity (open/closed) file descriptor info using KORN shell scripting

I am trying to find a way to check the current status of a file. Such as some cron job processes are dependent on the completion of others. if a file is currently being accessed / modified or simply open state I will wait until it is done being processed before attempting the next process on that... (3 Replies)
Discussion started by: Gary Dunn
3 Replies
Login or Register to Ask a Question