Solved

npri not on SunOS - is there an acceptable substitute

Posted on 2004-09-08
4
310 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 21

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 62

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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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…
Suggested Courses

617 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