- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: some questions in unix
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
Forums
Discussions
Discussions
Discussions
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
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
09-12-2005 07:53 AM
09-12-2005 07:53 AM
a)what is the maximum entry given in crontab
b)how many conjobs can run at a time
c)How to Schdule Jobs in Unix apart from cronjobs eg,A command to be executed at 12 hrs on every Monday what is the other method to schedule this apart from cronjobs...
How many job schedulers are available in unix.
Which one you will prefer?
d)How do you see child processes of a given process? otherwise the parent process and all child process ? how can i kill child as well as parant process ?
How do you kill all the child processes of a parent process?
e)
How to see a growing trace file?
f)How do u increase the priority of a process ?
g)
How to list only the directories in current directory ?
ls -d is not work ....
uacob004 $ ls -d
.
h)
What is sticky bit ?
i)How to replace the control characters (say ^M) from a file ?
j)
How to know the current shell version ?
How you will find out which shell i m working ?
ja)How do u come to know any commands in unix executed or not.How do you come to know whether the last process executed successfully or not
k)
What's the default and first shell ?
l)
How to make sure that the oracle session opened within a shell script will automatically get closed when process is killed at the unix side.
m)
what is nohup ? what is difference between nohup and &(ampersand)?
n)
How to rename a string in file from command promt
o)
How to move value in $10 to $9?
Thanx in advance If u have answer any one of this query ...
With regards,
Subrata
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 08:08 AM
09-12-2005 08:08 AM
SolutionDo you get a point for every right answer?
Speaking of points... I notice you haven't assigned points to any of your previous posts.
e) tail -f tracefile
f) "nice" command
g) ll | grep "^d"
h) Sticky bit use to mean keep an executable in memory, but now it is used on directories to only allow owner to modify/delete a file
i) tr -d "[:graph:]"
j) what /usr/bin/sh
ja) varitalb $? has exit value of last command
k) entry in /etc/passwd to use when user logs on
m) "nohup" keeps a background session active even if the launching session exits. "&" used to define a process to run in the background.
n) sed -e 's/string1/string2/g'
o) shift command
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 08:12 AM
09-12-2005 08:12 AM
Re: some questions in unix
many questions, some answeres.
a. don't remember if there is any limitations. I have never seen any problem.
c. cron, at
f. nice, rtprio (use with caution)
g. "find . -type d"
i. see man page for tr. \
k. I don't know if it is correct to call "Default" but, Posix shell is the standard HP-UX shell.
m. nohup is normally used together with &. makes the process imine to logout
n. sed
o. shift
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 08:13 AM
09-12-2005 08:13 AM
Re: some questions in unix
I will start at the beginning, I hope others will fill in the blanks :-)
A+B
# cat /var/adm/cron/queuedefs
wil give you the cron definitions.
something like
a.4j1n
b.2j2n90w
c.10j2n
"c" << the "c" queue, for cron jobs
"10j" << 10 cron jobs can be running simultaneously
"2n" << jobs will run at a nice value of 2
C
At is an other cronlike command.
J
# echo $shell
Ja, depends how you write your scripts.
H posix shell and korn shel (sh and ksh) root is strongly adviced to use the posix shell.
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 08:14 AM
09-12-2005 08:14 AM
Re: some questions in unix
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 08:20 AM
09-12-2005 08:20 AM
Re: some questions in unix
i have a confusion of this question as some of the answer i dont know and some i still have confusion ...
a) i have checked queuedefs command in crontabs it is q.[njobj][nicen][nwaitw]
njob The maximum number of jobs that can be run simultaneously in that queue. Although any number can be specified here, the total number of jobs that can be run on all the queues is limited to 100.
so i guess the 100 cron jobs will be submit at a time if I m wrong plz correct me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 08:23 AM
09-12-2005 08:23 AM
Re: some questions in unix
"man" and "google" will do the job in 3 minutes.
Alex.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 08:28 AM
09-12-2005 08:28 AM
Re: some questions in unix
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 08:29 AM
09-12-2005 08:29 AM
Re: some questions in unix
c) at , and own scripts , apart from cron.
d) ps -ef , kill -9
f) with nice command
g) ls -l | grep dr
h) to set special permission, every one can access and wrtie , but not delete.
i) with dos2ux command , or with awk and tr command.
j) echo $? [ Return 0 , for if the last command is successful ]
k) on hp-ux defaule shell is POSIX . /usr/bin/sh
m) nohup -> ro run a command in background even user logs out, or hangsup. Ampersand --> kills the process when logsout.
n) to rename a string from a command prompt use sed command. $ sed 's/old/new/' filename1 > filename2
o) $9="`echo $10`"
Enjoy ,
Cheers,
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 08:38 AM
09-12-2005 08:38 AM
Re: some questions in unix
e) tail -f trace_file
g) ls -l |grep '^d'
o) shift
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 09:00 AM
09-12-2005 09:00 AM
Re: some questions in unix
which one we have to prefer if i have to submit a job ... Is there any criteria / significance for using this job scheduler
d)How do you see child processes of a given process? otherwise the parent process and all child process ? How do you kill all the child processes of a parent process?
ps -ef give all my listing of processes How i know which one have is the parent processes and what is the child processes for that ...
f) i m use command nice -1 <
if already the process is running Can i increase the prioriry by checking the process (by ps -ef ) is there any other effect ...
ja)How do u come to know any commands in unix executed or not.How do you come to know whether the last process executed successfully or not
Tried varitalb $? But it is not working ....
Thanx again for ur reply ....
With regards,
subrato
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 09:07 AM
09-12-2005 09:07 AM
Re: some questions in unix
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 09:12 AM
09-12-2005 09:12 AM
Re: some questions in unix
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 09:12 AM
09-12-2005 09:12 AM
Re: some questions in unix
#!/usr/bin/sh
PPID=${1}
shift
ps -ef | awk -v ppid=${PPID} '{if (($3 + 0) == ppid print}'
Use it like this:
my.sh 6097 # to find all child processes of PID 6097
The status of the last executed command is ${?} BUT you must capture it immediately because the next command will alter it.
e.g.
ls -l /rrr/ggg
STAT=${?}
if [[ ${STAT} -eq 0 ]]
then
echo "Okay"
else
echo "Bad"
fi
Note: The exit status of MOST processes use 0 to indicate success but that status is the whim of the programmer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 09:14 AM
09-12-2005 09:14 AM
Re: some questions in unix
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 09:38 AM
09-12-2005 09:38 AM
Re: some questions in unix
PPID=${1}
shift
ps -ef | awk -v ppid=${PPID} '{if (($3 + 0) == ppid) print}'
and yes, the ($3 + 0) was intentional.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2005 02:37 PM
09-12-2005 02:37 PM
Re: some questions in unix
UNIX95=1 ps -eH
You can limit the listing to a given user login:
UNIX95=1 ps -fHu user-name
man ps for a lot of details
Bill Hassell, sysadmin