How to create a sym link pointing a changing name.


 
Thread Tools Search this Thread
Operating Systems AIX How to create a sym link pointing a changing name.
# 1  
Old 08-20-2010
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 /vas/data/EXT`date +"%y%m%d"`.txt /opt/avs/file

But since the link was created on 19th, it is pointing to /vas/data/EXT100819 as opposed to current day's file.

Is there a way t create symlinks for filenames that change. If not what is the best way to achive this?

Thanks
# 2  
Old 08-20-2010
Quote:
Originally Posted by vra5107
Is there a way t create symlinks for filenames that change.
Thanks
Nope -- symlink will 'point' to a fixed filename.

If you have control over the process that is creating the file with the date in the file, have it touch a 'done' file that has a constant name. You can have the scheduler watch for the done file and kick the second job off. The second job, or another cleanup job, can remove the done file so that the process can fire again the next day.

If you don't have control over the initial process, then you might have to write something that watches for the file and kicks the secondary job, or touches the done file. There may be other ways, but these are what popped into my head straight away.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk to create variables to pass into a bash loop to create a download link

I have created one file that contains all the necessary info in it to create a download link. In each of the lines /results/analysis/output/Home/Auto_user_S5-00580-6-Medexome_67_032/plugin_out/FileExporter_out.67... (8 Replies)
Discussion started by: cmccabe
8 Replies

2. UNIX for Dummies Questions & Answers

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... (4 Replies)
Discussion started by: Gussifinknottle
4 Replies

3. UNIX for Advanced & Expert Users

Cannot create a link with the same name

Hi - Our system admin cannot create a link to NAS with one particular name but he can create with other names. What might be the cause? Regards ---------- Post updated at 11:30 AM ---------- Previous update was at 11:29 AM ---------- It says permission denied. (2 Replies)
Discussion started by: w020637
2 Replies

4. Solaris

Create a Link for a directory

Hi, I need to create a link as stagein01 for the /p11/prod/stagein01/. Please let me know the procedure for the same. Regards, VN (5 Replies)
Discussion started by: narayanv
5 Replies

5. Shell Programming and Scripting

Using rsync --link-dest pointing to a remote server

Ok, I'm trying to figure out how to reference a remote file using the rsync --link-dest parameter. Here is the code I have so far: # # FILESERVER INCREMENTAL BACKUP SCRIPT # # Remove previous log file rm /usr/local/bin/rsync-incremental.log # Set daily variables DAY0=`date -I`... (6 Replies)
Discussion started by: Orionizer
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. Shell Programming and Scripting

How to create a user interface pointing to a file?

I have to create a user interface in which user can easily update ,delete or insert a new record which is pointing to a file in AIX Server? Using awk,sed ican update ,modify the file. how to create a link to userlike GUI(without using Tomcat,IIS) (3 Replies)
Discussion started by: laknar
3 Replies

8. BSD

sym link problem

Hi, I am using Mac X 10.5. It's supporting BSD. I am getting strange problem. • Launch the terminal. • Create a directory. Use cd <directory> • Now create another directory test with command “mkdir test”. • Create a soft link with command “ln -s text.txt test” • Go to the test directory... (1 Reply)
Discussion started by: Saurabh78
1 Replies

9. OS X (Apple)

Sym Link problem

Hi, I am using Mac X 10.5. It's supporting BSD. I am getting strange problem. • Launch the terminal. • Create a directory. Use cd <directory> • Now create another directory test with command “mkdir test”. • Create a soft link with command “ln -s text.txt test” • Go to the test directory... (1 Reply)
Discussion started by: Saurabh78
1 Replies

10. UNIX for Dummies Questions & Answers

Create Symbolic Link

I am Solaris korn shell. I want to create a symbolic link. I have a directory /u01/ftp01/db I want to reference it as /u05/swe/my (this is not a real directory) I tried a symbolic link but it does not work ln -s /u01/ftp01/db /u05/swe/my ln: cannot create //u05/swe/my: No such... (2 Replies)
Discussion started by: lesstjm
2 Replies
Login or Register to Ask a Question