Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    nice and ionice applied on a bash script also apply on commands inside


    Hello,

    when i apply nice and ionice on a bash script (meaning i run bash script with certain nice or ionice priority)

    example via cronjob:

    $ cat /etc/cron.d/cronfile
    * * * * * root /bin/nice -n 19 /usr/bin/ionice -c2 -n7 /bin/sh /path/to/script.sh
    $ cat script.sh
    find /some/path -type f -delete
    will the find command run with lower priority also? Or i need to define priority also before find command?

    If i define it both for bash script and for the command, will it conflict anyhow?

  2. #2
    Linux User
    Join Date
    Jul 2016
    Posts
    443
    Quote Originally Posted by postcd View Post
    Hello,
    when i apply nice and ionice on a bash script (meaning i run bash script with certain nice or ionice priority)example via cronjob:

    $ cat /etc/cron.d/cronfile


    $ cat script.sh


    will the find command run with lower priority also? Or i need to define priority also before find command?

    If i define it both for bash script and for the command, will it conflict anyhow?
    do you even know what either of those things do? did you read the man pages? or do you just post questions all over the place to keep from doing any experimenting and work on your part?

  3. #3
    Linux Guru
    Join Date
    Dec 2013
    Posts
    2,747
    Quote Originally Posted by habit View Post
    post questions all over the place to keep from doing any experimenting and work
    yep, another duplicate found on LQ.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User
    Join Date
    Jul 2016
    Posts
    443
    -->
    Quote Originally Posted by nihili View Post
    yep, another duplicate found on LQ.
    not surprised at all. postcd does this constantly in other forums. another one who doesnt want to learn anything but have things given to them like 'press these keys in this order and your problem will go away". dont care about the why or the fact they post 94 other questions that are just like it, because they dont learn.

    case in point
    http://www.linuxforums.org/forum/mis...ue-anyhow.html
    http://www.linuxforums.org/forum/net...-some-ips.html
    http://www.linuxforums.org/forum/sec...les-t-nat.html
    http://www.linuxforums.org/forum/mis...r-archive.html
    http://www.linuxforums.org/forum/sec...ial-match.html
    Last edited by habit; 11-30-2017 at 07:51 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •