Solved

npri not on SunOS - is there an acceptable substitute

Posted on 2004-09-08
4
306 Views
Last Modified: 2010-04-21
I am running a cron job to remove log files that reach a certain size.  On the IRIX OS, this is no problem.  However, the command I'm using (npri) doesn't exist on the SUNs.  What can I use instead?
0
Comment
Question by:ambulance
4 Comments
 
LVL 20

Expert Comment

by:tfewster
ID: 12007483
`npri` is used to set the priority of a process; The equivalent command under Solaris would be `nice` or `renice`
0
 

Author Comment

by:ambulance
ID: 12007567
Could I use it the same way?

The 5 columns, nice find /mnt/project_out/.....*.log -size 9765 -exec rm {} \; &

0
 
LVL 18

Accepted Solution

by:
liddler earned 125 total points
ID: 12007768
Yes, that should work, you can specify how nice (1-19) you want to lower the priority of the job by
nice -n 19 ...
to make it really low priority, the default is 10
0
 
LVL 61

Expert Comment

by:gheist
ID: 12016211
Equivalent command is called priocntl ( defeating process aging, setting fixed high or low "pri" value etc) , but "nice" is posix utility and suits your application perfectly.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now