Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

npri not on SunOS - is there an acceptable substitute

Posted on 2004-09-08
4
Medium Priority
?
312 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 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 500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month12 days, 16 hours left to enroll

971 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