Find the answer to your Linux question:
Results 1 to 6 of 6
i have 2 txt files usr/local/minecraft_server/vip/whitelist.txt usr/local/minecraft_server/public/whitelist.txt and i want them to copy over to /path/to/www/minecraft/files/vip/whitelist.txt /path/to/www/minecraft/files/public/whitelist.txt Maybe a simple backup script would do it but the file has to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2013
    Posts
    7

    copying txt files


    i have 2 txt files
    usr/local/minecraft_server/vip/whitelist.txt
    usr/local/minecraft_server/public/whitelist.txt

    and i want them to copy over to

    /path/to/www/minecraft/files/vip/whitelist.txt
    /path/to/www/minecraft/files/public/whitelist.txt

    Maybe a simple backup script would do it but the file has to stay in original directory and be copied to the web directory for viewing on the forum.


    I want it to do this once every 30 mins or hour
    I have been using linux for a few months but never explored its capabilities, maybe now is the time i should do it.

    This is my first ever post or request for help and i did do a bit of googling before pesetering you guys here with what seems like a stupid noob question to some of you..

    i look forward to your reply
    ty in advance
    rebz

  2. #2
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    878
    Welcome!

    This looks like a job for cron (see man cron). However, maybe a symlink will do.

  3. #3
    Just Joined!
    Join Date
    Jan 2013
    Posts
    7
    Quote Originally Posted by Segfault View Post
    Welcome!

    This looks like a job for cron (see man cron). However, maybe a symlink will do.
    ya that doesn't help me in the slightest
    when i say im a noob i mean really i AM a noob

    thanx for the welcome though

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    The copy command has a lot of options. If you simply want to copy from the example above you could do: cp /usr/local/minecraft_server/vip/whitelist.txt /path/to/www/minecraft/files/vip/whitelist.txt

    To find options, you can open a terminal and just type: man cp. If that is too cryptic for you, you should be able to find thousands of sites with basic info on the Linux copy command. The site below has some explanations and examples, might be worth your while to take a look:

    Linux and UNIX cp command help and examples
    How to use the cp command, by The Linux Information Project

    The reference to cron above is that it is used to run scripts at a set time on a regular basis. There are also an extremely large number of sites with explanations and tutorials:

    http://www.linuxweblog.com/crotab-tutorial

  6. #5
    Just Joined!
    Join Date
    Jan 2013
    Posts
    7
    all way over my head ill try askin for help on a diff forum, thanx for ur replies

  7. #6
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    878
    Basically, if there is a file that gets updated in regular basis and I want it to be present in another location I'd use (sym)linking. If it does not work for some reason, like chroot or jail I'd use cron to copy it over ... maybe. There may be better solutions ... just the description of problem is not very detailed.

Posting Permissions

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