Solved

npri not on SunOS - is there an acceptable substitute

Posted on 2004-09-08
4
305 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
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 several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

760 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

19 Experts available now in Live!

Get 1:1 Help Now