Find the answer to your Linux question:
Results 1 to 6 of 6
I need to create this link between the two directories shown below.... So I assume everything that is put into the outgoing directory is copied to # pwd /home/e-smith/files/users/admin/home ls ...
  1. #1
    Just Joined!
    Join Date
    Feb 2011
    Posts
    1

    Urgent help.. on a very simple problem, linking 2 directories.

    I need to create this link between the two directories shown below.... So I assume everything that is put into the outgoing directory is copied to


    # pwd
    /home/e-smith/files/users/admin/home
    ls -l
    lrwxrwxrwx 1 root root 29 Jun 25 2008 outgoing -> /var/spool/asterisk/outgoing/


    Can anyonbe tell me how I create this link ?

    Many thanks.

    J

  2. #2
    Just Joined! rafatmb's Avatar
    Join Date
    Feb 2011
    Location
    Brazil
    Posts
    25

    Link

    I think that you're trying to create a symbolic link.

    To do that:

    ln -s /home/e-smith/files/users/admin/home/outgoing /var/spool/asterisk/outgoing

    Good luck!

  3. #3
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,100
    If your intention is to have files in BOTH directories (ie: copies) , then a link is the wrong way.

    A solution to such a problem might be gfs, or drbd, or a incrond that triggers rsync, or a cronjob.
    But actually, this might be overkill.

    What do you want to achieve?
    Do you want to just look at the files? Then maybe that user can be added to an appropiate group.
    You must always face the curtain with a bow.

  4. #4
    Just Joined!
    Join Date
    Oct 2008
    Posts
    6
    If you want to create a symbolic link than you can follow the solution given by "rafatmb"

    Other than this you can create a hard link also

    # ln /home/e-smith/files/users/admin/home/outgoing /var/spool/asterisk/outgoing

    Using this you are unable to see the link, but you can confirm that these two files are link files by checking their inode numbers.

  5. #5
    Just Joined! rafatmb's Avatar
    Join Date
    Feb 2011
    Location
    Brazil
    Posts
    25

    Link

    Just to clarify: symbolic links you can use when the folders are one different disks/partitions. The hardlink you must have the both folders on some partition.

  6. #6
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,100
    Plus, you cant hardlink directories
    You must always face the curtain with a bow.

Posting Permissions

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