Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Create Sym Links for a series of files Post 302941118 by Gussifinknottle on Monday 13th of April 2015 09:01:52 AM
Old 04-13-2015
Question Create Sym Links for a series of files

Hello,

I would like to create symbolic links for a series of files in my cwd (after confirming that the links don't already exist). The above files all have a similar prefix, but different extensions.

I created a shell script like shown below and I get an error message "No such file or directory"

Code:
#!/bin/sh

for x in `ls -1 /myRandomDir/myFiles.*`
do
    if [ ! -f $x ]
    then
        ln -s $x
    fi
done

What should I do differently.

Thanks!
~Guss
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

find and sym links

Would I be correct in assuming that find doesn't bother recursivley searching down sim links. (It doesn't seem to so I guess it doesn't!!!) Is there anyway to make it do so? (3 Replies)
Discussion started by: peter.herlihy
3 Replies

2. UNIX for Dummies Questions & Answers

How do I organize a series of files in date order?

I'd like to ls a group of files in date order but I'm not sure what the commands would be. Can anyone help with this? (1 Reply)
Discussion started by: hedgehog001
1 Replies

3. UNIX for Dummies Questions & Answers

rsync with --link-dest doesn't create hard links

I have been experimenting with rsync as a scriptable backup option, reading various example and tips pages, including Time Machine for every Unix out there - IMHO That page seems to describe the exact behavior I want: The ability to make a "full backup" snapshot regularly, but with rsync... (0 Replies)
Discussion started by: fitzwilliam
0 Replies

4. AIX

How to create a sym link pointing a changing name.

Hello A new file is created every day with the date appended to the end of a name. We are using Autosys to run jobs which watches for the file and runs jobs. But Autosys does not have the capability to figure out the current date. I tried creating a symlink like this ln -s... (1 Reply)
Discussion started by: vra5107
1 Replies

5. UNIX for Dummies Questions & Answers

can I create symbolic links for multiple files simultaneously

Does anybody know how to make symbolic links for multiple files simultaneously? Often times I need make symbolic links for multiple files with some common pattern (just like "*.jpg"). Is there a way to avoid making symbolic link for each of them one by one... Thank you! (6 Replies)
Discussion started by: danieladna
6 Replies

6. Solaris

Create sym-link into /dev (zone)

Hi i need to install a software into a zone, and this kind of software needs to have a file who is linked into /dev. But it is not possible to create a link into /dev nor create a file into it. -bash-3.00# ln -s /tmp/testfile /dev/ ln: cannot create /dev//testfile: Permission denied... (2 Replies)
Discussion started by: beta17
2 Replies

7. Solaris

Hard Links and Soft or Sym links

When loooking at files in a directory using ls, how can I tell if I have a hard link or soft link? (11 Replies)
Discussion started by: Harleyrci
11 Replies

8. Shell Programming and Scripting

Create tar file excluding all hard links

I have a problem with tar. Taring a folder with a lot of contents, causes the tar to contain hard links to some files, seen with the same name but 0 in size. The hard links don't exist in the first place. How can I prevent that from happening? I am using the -T option with either -n or... (2 Replies)
Discussion started by: Tribe
2 Replies

9. Shell Programming and Scripting

Running a script over a series of files

Hi, I want to run a script over a series of files with the names : Sample_1.sorted.bam Sample_2.sorted.bam Sample_3.sorted.bam How can I specify it in my script. Thanks a lot in advance. (3 Replies)
Discussion started by: Homa
3 Replies

10. UNIX for Advanced & Expert Users

Find cmd and sym links

Hi. Can somebody tell me if there's a way of creating a symbolic link from a directory on one filesystem to that on another that will allow a find command that doesn't use the -L param to locate a particular file under that new 'linked' dir. With a normal sym link the find command on that... (6 Replies)
Discussion started by: user052009
6 Replies
update-boinc-applinks(1)												  update-boinc-applinks(1)

NAME
update-boinc-applinks - create/remove symbolic links for anonymous BOINC applications SYNOPSIS
update-boinc-applinks [options] DESCRIPTION
update-boinc-applinks creates (or removes) symbolic links for anonymous BOINC applications and their associated app_info.xml files in a given BOINC data directory. Note: update-boinc-applinks is an extension for Debian users and is only available in Debian's boinc-client package. OPTIONS
For a full summary of options, run update-boinc-applinks --help. -h, --help Show help message and all options. --create Create symbolic links and project directories. --remove Remove symbolic links and empty project directories. --data-dir=DIR Manage symbolic links in the given directory DIR. If this option is not present, DIR defaults to the current working directory. --project=PROJECT Manage symbolic links only for the given project PROJECT. Run update-boinc-applinks --list-projects to get a list of projects for which anonymous applications are available and therefore can be replaced with PROJECT. If this option is not present, update-boinc- applinks will manage symbolic links for all available projects. --list-projects Show a list of projects for which anonymous applications are available. Normally those applications are provided by packages called boinc-app-PROJECT (e.g. boinc-app-seti). AUTHOR
Written by Frank S. Thomas. COPYRIGHT
Copyright (C) 2006, 2008 Debian BOINC Maintainers. This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation. 13 January 2008 update-boinc-applinks(1)
All times are GMT -4. The time now is 02:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy