1753706 Members
4632 Online
108799 Solutions
New Discussion юеВ

shell execution problem

 
harjeet_3
Occasional Advisor

shell execution problem

hello,

That, I use HP-UX ver 10.*

That, daily, I execute one shell present in the "global" folder which is sub-folder of /usr1/usr3, using the following commands.

#cd /usr1/usr3/global
#./ntpatch

Today I did the same but message appears "file not found"

That, I use ll/ls command to get the listing of file(s) in the folder named "global" but it shows ". not found". That folder is sub-folder of /usr1/usr3 folder. but if i use the listing command with full path i.e. "ll /usr1/usr3/global then it shows the list of files present in the "global" folder.

That, In this context I have taken a shutdown and run the fsck command for all the file-system including /usr1, but all is in vain.

In view of the above submission my query is why such strange thing begun to happen. Please help me as it is important shell that i have to execute daily.

thanks in advance
6 REPLIES 6
Prashantj
Valued Contributor

Re: shell execution problem

Hi Harjeet,

Please try to execute the script with sh -x command and if possible please send me script in txt format.

-Prashant
Good judgment comes from experience and experience comes from bad judgment.
Steven Schweda
Honored Contributor

Re: shell execution problem

> [...] I use HP-UX ver 10.*

uname -a

> [...] I use ll/ls command [...]

As usual, it can be more helpful to show
actual commands with their actual output,
rather than vague descriptions or
interpretations. Don't _tell_ me what you
did and what happened, _show_ me.

mount
cd [...]
ls -l [...]
[...]
Dennis Handly
Acclaimed Contributor

Re: shell execution problem

>i.e. "ll /usr1/usr3/global" then it shows the list of files present in the "global" directory.

What happens when you do: cksum /usr1/usr3/global/*

Can it find, then read the content of those files?
Bill Hassell
Honored Contributor

Re: shell execution problem

The shell script must be executable when you type script name. ll will show the script, but to run a script, it must be executable (ie, 755 permissions).


Bill Hassell, sysadmin
Matti_Kurkela
Honored Contributor

Re: shell execution problem

> ". not found"

This error message would suggest filesystem corruption. I hope you have good backups.

> I have taken a shutdown and run the fsck command for all the file-system including /usr1, but all is in vain.

Did you run a _full_ fsck?

For vxfs-type filesystems, the default is to run a short filesystem check only. When the operating system detects the filesystem is damaged, it places a damage indicator to the superblock, which causes a full fsck to run automatically. But I guess some types of filesystem corruption might go undetected.

If the filesystem type is vxfs and you aren't 100% certain you already ran a _full_ filesystem check on it, please reboot the system to single-user mode and explicitly run a full filesystem check:

fsck -F vxfs -o full /dev/

MK
MK
Dennis Handly
Acclaimed Contributor

Re: shell execution problem

>MK: please reboot the system to single-user mode

Any reason you can't unmount it and run fsck(1m) in non-single-user mode?