Symbolic Links Wildcards?

Symbolic Links Wildcards?

Post by Be » Wed, 02 Jul 2003 08:22:27



Ive been trying to think of a way to to use wildcards while making
file links but cant get it to work.  I have several files in
/html/test/ and I want every file in that directory (hundreds of
images) to be symlinked here /html/test2 and doing it one file at a
time is a huge headache.  I was hoping I could just go to /html/test2/
and use ln -s path_to/test/* but its not doing it.  Is there anyway to
accomplish this without having to type out each and every one?  I
would love to find a way to do this.

Any help would be appreciated.

 
 
 

Symbolic Links Wildcards?

Post by Barry Margoli » Wed, 02 Jul 2003 08:48:32




>Ive been trying to think of a way to to use wildcards while making
>file links but cant get it to work.  I have several files in
>/html/test/ and I want every file in that directory (hundreds of
>images) to be symlinked here /html/test2 and doing it one file at a
>time is a huge headache.  I was hoping I could just go to /html/test2/
>and use ln -s path_to/test/* but its not doing it.  Is there anyway to
>accomplish this without having to type out each and every one?  I
>would love to find a way to do this.

ln -s path_to/test/* .

When you specify a directory as the last argument to ln, it makes links in
that directory for all the other arguments.

--

Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

Symbolic Links Wildcards?

Post by Be » Thu, 03 Jul 2003 01:35:07





> >Ive been trying to think of a way to to use wildcards while making
> >file links but cant get it to work.  I have several files in
> >/html/test/ and I want every file in that directory (hundreds of
> >images) to be symlinked here /html/test2 and doing it one file at a
> >time is a huge headache.  I was hoping I could just go to /html/test2/
> >and use ln -s path_to/test/* but its not doing it.  Is there anyway to
> >accomplish this without having to type out each and every one?  I
> >would love to find a way to do this.

> ln -s path_to/test/* .

> When you specify a directory as the last argument to ln, it makes links in
> that directory for all the other arguments.

Thank You!  Thats a huge time saver.
 
 
 

Symbolic Links Wildcards?

Post by Barry Margoli » Thu, 03 Jul 2003 02:04:10




>Thank You!  Thats a huge time saver.

Even compared to reading the man page?

SYNOPSIS
     /usr/bin/ln [-fns] source_file [target]
     /usr/bin/ln [-fns] source_file... target
...
     In the second synopsis form, the ln utility  creates  a  new
     directory  entry  for  each  file specified by a source_file
     operand, at a destination path  in  the  existing  directory
     named by target.

--

Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

1. Too many symbolic links, Symbolic link loop

Hello,

I'm fighting with a FreeBSD machine. Roughly what I'm up to: I clean
installed FreeBSD, with the DES option. The goal is to set up an Apache
on the machine. Then I performed a rdist from a BSDI machine, importing
stuff like password file, user directories, user quotas, shells. The
Apache works
just fine, but when I try to run Perl I get stuck with the error
message:
"Too many symbolic links" (under bash), "Symbolic link loop" (under sh).
I've
scanned through my symbolic links w/o finding something striking.
Basically, the
links I have are "shortcuts to shells", some links to user logs...
Anyone seen this kind of problem? Anyone solved it? How?

        Cheers

                Michael
--
Michael Hallgren, Easynet France
Write : http://www.loria.fr/tex
Play : http://www.perl.com/perl

2. summary of login times and days of specific users

3. wildcard expansion and symbolic links (csh, sh, ksh, bash)

4. x86 2.4 Locks Up When SCSI Tape Accessed

5. symbolic link not a real link

6. ATA on Linux

7. kill symbolic link along with the linked file?

8. Getting Hold Of Linux

9. symbolic link not a real link

10. regular link of a symbolic link

11. A hard link or a symbolic link?

12. find: cannot follow symbolic link sym-link

13. symbolic link with flags on link?