Unix Programming - create a mirror: directories created, files linked

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > May 2006 > create a mirror: directories created, files linked





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author create a mirror: directories created, files linked
billy

2006-05-11, 1:17 pm

I need to mirror a directory structure and create links for the files.
THere will be no links embedded. I'm assuming that I can do this with
find in 2 steps
1. create the linktree directory structure.
find SOURCE_TREE -type d -exec mkdir -p LINK_TREE/- {} \;
2. create links to files
find SOURCE_TREE -type f -exec ln -s LINKTREE/- - {} \;

Not sure about the syntax. That is where I need the help.

2006-05-11, 7:15 pm

In article <1147368866.163157.32200@j73g2000cwa.googlegroups.com>,
billy <bp1497@att.com> wrote:
>I need to mirror a directory structure and create links for the files.
>THere will be no links embedded. I'm assuming that I can do this with
>find in 2 steps
>1. create the linktree directory structure.
> find SOURCE_TREE -type d -exec mkdir -p LINK_TREE/- {} \;
>2. create links to files
> find SOURCE_TREE -type f -exec ln -s LINKTREE/- - {} \;
>Not sure about the syntax. That is where I need the help.


man lndir
billy

2006-05-12, 1:15 pm

not available on hpux

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com