Results 1 to 5 of 5
  1. #1

    linux file shortcut?

    k my server runs cpanel, and here's the scenario:
    I have a website that has alot of files in it's folder, like public_html/site/folder_of_files/

    now, that site uses the files on the site. I want to create a new website similar to it with the same code, and want it to be able to use the same files, but I do not want to have to recreate all the files inide the path for the site (like public_html/newsite/folder_of_files/) because there is not enough HD space. Additionally I do not want to have to recode the site to know to use it from the other sites folder.

    so I wanted to know if it was possible to create something similar to a windows shortcut for all the files? So I can let the server knows when th escript tries to access a file from public_html/newsite/folder_of_files/ to read that file name from public_html/site/folder_of_files ?

  2. #2
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    Hi,

    You can try creating a symlink.
    ie, inside public_html/newsite/ you can create a link to public_html/site/folder_of_files/. So you will be able to use same code itself because all files will be in the same location.
    You can create a symlink using ln -s command.
    Inside the public_html of the new site
    ln -s /path to the old site files/ . This will create the directory with the same name.
    How ever if you have restrictions like safe_mode or open_base_dir this will throw errors.
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  3. #3
    Join Date
    Apr 2001
    Location
    Paradise
    Posts
    11,868
    Do you have SSH access? if yes, you can create a symbolic link.

    ln -s /path/to/source sym_link_name
    Shared Web Hosting - Reseller Hosting - Semi-Dedicated Servers - SolusVM/XEN VPS
    LiteSpeed Powered - R1Soft Continuous Data Protection - 24/7 Chat/Email/Helpdesk Support
    Cpanel/WHM - Softaculous - R1soft Backup - Litespeed - Cloudlinux -Site Builder- SSH support - Account Migration
    DowntownHost LLC - In Business since 2001- West/Center/East USA - Netherlands - Singapore

  4. #4
    so how do I specify the place to use them and place to read from? According to jedito's post i only see 1 place to specify a path

  5. #5
    Join Date
    Apr 2001
    Location
    Paradise
    Posts
    11,868
    no, sorry, there are two

    ln -s /path/to/source /path/to/target

    that's what I meant with sym_link_name
    Shared Web Hosting - Reseller Hosting - Semi-Dedicated Servers - SolusVM/XEN VPS
    LiteSpeed Powered - R1Soft Continuous Data Protection - 24/7 Chat/Email/Helpdesk Support
    Cpanel/WHM - Softaculous - R1soft Backup - Litespeed - Cloudlinux -Site Builder- SSH support - Account Migration
    DowntownHost LLC - In Business since 2001- West/Center/East USA - Netherlands - Singapore

Posting Permissions

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