Linux.com

bastib

bastib

  • Linux.com Member
  • Posts: 6
  • Member Since: 22 May 09
  • Last Logged In: 30 Apr 10

Latest Posts

Posted by
Topic
Post Preview
Posted
  • bastib
    RE: cron running scripts
    Hi, I thought your script produces an error and you won't see that in the output file if you had an entry like [code]* * * * * script.sh > output.txt[/code] because that redirects only stdout. The last thing I can imagine is that you have to use the full path of touch like: [code] #!/bin/bash /usr/bin/touch /home/dennis/delme.txt [/code] and see if that works... To see where it is installed type [code]which touch[/code] Basti
    Link to this post 25 May 09

    Hi,

    I thought your script produces an error and you won't see that in the output file if you had an entry like

    * * * * * script.sh > output.txt

    because that redirects only stdout.

    The last thing I can imagine is that you have to use the full path of touch like:


    #!/bin/bash
    /usr/bin/touch /home/dennis/delme.txt

    and see if that works...

    To see where it is installed type

    which touch

    Basti

  • bastib
    RE: cron running scripts
    Just to be shure... Did you try the touch-script with absolute path in crontab? Perhaps ~/script.sh expands to /root/script.sh as cron is run as root (?) If you tried an absolute path with the git-script and just redirected [i]stdout[/i] the file is blank because it just tells you that there is no repository on [i]stderr[/i] and exits. Basti
    Link to this post 25 May 09

    Just to be shure...

    Did you try the touch-script with absolute path in crontab?
    Perhaps ~/script.sh expands to /root/script.sh as cron is run as root (?)

    If you tried an absolute path with the git-script and
    just redirected stdout the file is blank because it just tells you that there is no repository on stderr and exits.

    Basti

  • bastib
    RE: cron running scripts
    or you have to cd to the right directory first (in the script)?
    Link to this post 25 May 09

    or you have to cd to the right directory first (in the script)?

  • bastib
    RE: Running processes in the background
    Hi, if I run a job in background here I still see the output in the terminal... you can store the output in a file and check that file later like [code]./bigjob.sh > output.txt &[/code] but I guess you know that. A running job can be stopped with CTRL+z. If you type [code]bg[/code] it continues execution in background. With [code]fg[/code] you can reattach it if you want. Have you tried [i]screen[/i] already? With this tool you can start the big job and even close the terminal (or close the connection if it is a remote host) and later reattach it. This would work something like that [code]screen -d -m bigjob.sh [/code] to reattach: [code] screen -d -r [/code] with CTRL+a CTRL+d you can detach again. Perhaps it helps... Basti
    Link to this post 25 May 09

    Hi,

    if I run a job in background here I still see the output in the terminal...
    you can store the output in a file and check that file later like

    ./bigjob.sh > output.txt &

    but I guess you know that.

    A running job can be stopped with CTRL+z. If you type

    bg
    it continues execution in background. With
    fg
    you can reattach it if you want.

    Have you tried screen already?
    With this tool you can start the big job and even close the terminal (or close the connection if it is a remote host) and later reattach it.
    This would work something like that

    screen -d -m bigjob.sh

    to reattach:

    screen -d -r

    with CTRL+a CTRL+d you can detach again.

    Perhaps it helps...
    Basti

  • bastib
    RE: Network Driver (snull)
    Hi, I guess you are reading the book about device drivers from O'Reilly. As far as I remember snull is an example network driver that creates 2 interfaces. It works like loopback split in 2 devices. Traffic send through one of the interfaces will be received at the other. The book was written for kernel 2.4. I don't know if the code still works without modifications. Hope it helps Basti
    Link to this post 24 May 09

    Hi,

    I guess you are reading the book about device drivers from O'Reilly.
    As far as I remember snull is an example network driver that creates 2 interfaces. It works like loopback split in 2 devices.
    Traffic send through one of the interfaces will be received at the other.

    The book was written for kernel 2.4. I don't know if the code still works without modifications.

    Hope it helps
    Basti

  • bastib
    RE: more man page trouble
    I think you should use [code]export PATH="${PATH}:/opt/gnome/bin"[/code] this appends your PATH-variable. [code]export PATH="/opt/gnome/bin"[/code] overwrites it afaik.
    Link to this post 23 May 09

    I think you should use

    export PATH="${PATH}:/opt/gnome/bin"

    this appends your PATH-variable.
    export PATH="/opt/gnome/bin"

    overwrites it afaik.

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board