Find the answer to your Linux question:
Results 1 to 2 of 2
I am editing my /etc/rc dot local file so that when my server starts it will run a program I want. The problem is I don't know how to aim ...
  1. #1
    Just Joined!
    Join Date
    Apr 2011
    Posts
    1

    How do I run a program at start?

    I am editing my /etc/rc dot local file so that when my server starts it will run a program I want.

    The problem is I don't know how to aim at the file.

    The command line I am trying to run is screen ./minecraft dot sh
    which is in the folder /home/minecraft

    But, when the server first starts it is in [root at minecraft~] and I usually have to type cd .. first before I am in my / directory.

    How do I write this command line in rc dot local so it points to the desired file in that directory?

    sorry about the dots but apparently these are web addresses =/

  2. #2
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    To execute a file in Linux you just have to give the path to that file. That's what "./file" is: it means "file in the current directory". So in this instance, you can just say "/home/minecraft/minecraft.sh".
    DISTRO=Arch
    Registered Linux User #388732

Posting Permissions

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