- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Few issues.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-22-2001 08:10 PM
тАО02-22-2001 08:10 PM
Few issues.
I have foll. queries for you friends...
1. In HP-UX, is there anyway to undelete file or Directory if removed with rm?
If no, why we can't do it?
2. I am attaching here two files.
1st: test which is there in /sbin/init.d and 2nd: profile which is the .profile file for user aplora.
I want to run test script at server startup for which I have created links successfully. In my .profile, I want that if it is run at server startup, it should not execute the dbmenu script which I have called in .profile. To do this, I am defining one global var. in test script called mname in which I store "root". In .profile file, I check that if mname <> 'root', then do some task.
However, in .profile, it does not behave the way I want it to.
3. suddenly, I am unable to go to my one directory named "Xerox" which is in my root dir. if I give cmd.
cd /Xerox
if gives foll. msg
sh: Xerox: not found
if I give ll Xer*, it shows foll.
drwxrwxrwx 3 root sys 96 Sep 25 1999 Xerox
I log in as root still it gives problem
if I give chmod 777 Xerox, it gives foll. msg.
chmod: can't access Xerox
What could be the problem?
Thanks in advance...
Samir.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-22-2001 08:56 PM
тАО02-22-2001 08:56 PM
Re: Few issues.
#1) No you can't 'unrm' something that has been deleted with the rm command. That is why you should have backups. If something is accidentally removed then you restore it from backup. The main reason for not having an 'unrm' is probably that it would take to many system resources, especially disk space. Typically if I remove something I do so because 1) it isn't needed anymore, and 2) I want to free up disk space. If you had a 'Trash Can' feature, like Windows, then you would have to be sure and empty the 'Trash Can' periodically. How many people do you know that never empty the Windows trash can? I know several.....
#2) Not sure
#3) There is probably some extraneous character at the end of the Xerox name. Since you can do an ll on it, that does show that it exists. Try doing a 'cd Xerox*' and see if it lets you into the directory. If it does then there is a unprintable character at the end of the directory name. What you could do then is make a new directory called Xer and the copy everything from Xerox*/* into Xer. You could then remove the Xerox* directory and mv Xer to Xerox.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2004 12:12 AM
тАО10-13-2004 12:12 AM
Re: Few issues.
ll | cat -ev
..this should display any "non-printable" character embedded or following Xerox.
Best of luck,
Serge Poitras
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2004 12:47 AM
тАО10-13-2004 12:47 AM
Re: Few issues.
2. The start/stop script looks fine. However, you do *NOT* want to run this script in .profile. The template is designed to run only at startup/shutdown and should be tested there. If the application fails to keep running, fix the application. If start/stop for the script fails to work, debug it with:
sh -x /sbin/init.d/your_script start
Most likel;y, the failure is related to environmental variables required by the /software1/app/oratst/startapltst.sh 'start' and su - aplora -c /software1/app/oratst/stopapltst.sh scripts. Use sh -x on those scripts too.
.profile - lots of notes:
>> TERM=vt100
>> export TERM
Never hardcode TERM=vt100. This guarentees problems when users run other types of terminal emulators. Always query the terminal and set TERM+LINES+COLUMNS:
eval $(ttytype -s)
>> name=`who am i|cut -c12-19`
>> add=`who -u|cut -c 52- | grep 192`
Never use cut -c to parse other commands. A small change made to the who output format will break all of your scripts. Use fields as in:
name=$(who -m | awk '{print $2}')
add=$(who -mu | awk '{print NR}')
who am i can be simplified to who -m. I believe that your who -u is incorrect, that you want the current IP address of the incoming user. who -mu will do that for you. awk's NR variable always finds the last field regardless of columns and total fields.
The date command has a ; at the end that doesn't look right. The rest of the .profile looks OK but you'll have to trace it to make sure (set -x in the .profile).
3. The ll/ls command has a very nice option: -b which will shows non-displayable special characters:
ls -b Xerox*
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2004 12:55 AM
тАО10-13-2004 12:55 AM
Re: Few issues.
If you want it to run during system startup then you have create link files in /sbin/rc2.d starting with "S" for startup and in /sbin/rc0.d starting with "K" for stopping that script.
Similarly if you want to manually start the script the you should say:
# /sbin/init.d/test start.
Need to structurised your files accordingly.
Hope that helps.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2004 12:58 AM
тАО10-13-2004 12:58 AM
Re: Few issues.
Also found one docs saying file recovery on UNIX systems but still i agree with the comments made above and don't trust this one.
As a last resort you can try it out (Fortunately i never had that time and also i never tried out that procedure)
see the attached doc.
All the best.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2004 01:04 AM
тАО10-13-2004 01:04 AM
Re: Few issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2004 05:46 PM
тАО10-13-2004 05:46 PM