03-16-2009
Testing targets of link files > ln -s
Hi all
Ive been given the task to write a script that tests that certain link files work, i.e. the physical directory the link points too, is actually there.
Now, before I go down the route of ls -l | awk ...... or using test or find, is there a far more simpler command that I can use ?
Or, has anyone got a script that might help me out.
Great site by the way, often spent the odd hour or so going through messages as a guest, so decided to join :-)
Cheers
SBK - Sussex - UK
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Can anyone say some ideas about using/creating link files (for ex., lrwxrwxrwx 1 bin bin 7 Jan 10 2001 bin -> usr/bin) in a shell script. (2 Replies)
Discussion started by: yuvasyntel
2 Replies
2. UNIX for Dummies Questions & Answers
Does any one now if you can change permissions on a linked file with out completely removing it and then relinking it? (2 Replies)
Discussion started by: moviestud80
2 Replies
3. UNIX for Dummies Questions & Answers
How do you identify the type of a link in the output of the ls -l command? (1 Reply)
Discussion started by: Tom Bombadil
1 Replies
4. Shell Programming and Scripting
I have a shell script which GETS a file, but I only want to run this script if $FILE exists on the remote host, don't know correct syntax.....please help
ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
bin
get $FILE
rename export.prn export.prn.$TIMESTAMP
!cat... (0 Replies)
Discussion started by: walterja
0 Replies
5. Shell Programming and Scripting
if I have 1000 files, named file1, file2, ... ,file1000. for each one, I want to append a line, for example "this is the end of file#".
then, I want to link them all together.
how can I do that by using a simple script? (1 Reply)
Discussion started by: fredao
1 Replies
6. Solaris
I setup RSC on a 280R using the network connection. Unfortunately, I am unable to telnet to this card and I was wondering if there was a way to test the link from the rsc card. Here is my rsc configuration:
machine1:/tmp/rsc# /usr/platform/SUNW,Sun-Fire-280R/rsc/rscadm show
page_enabled="false"... (0 Replies)
Discussion started by: dangral
0 Replies
7. UNIX for Dummies Questions & Answers
Hi All
I need to parse the target
something like:
ifeq '$@' 'first'
echo 1 $@
endif
ifeq '$@' 'second'
echo 2 $@
endif
The thing is to be able compare the target string to any string and then do the commands
Thanks a lot
ziv (0 Replies)
Discussion started by: zivsegal
0 Replies
8. UNIX for Dummies Questions & Answers
**DUP post in Shell Programming and Scripting ***
Hello,
I'm still learning the ins and outs of how to combine multiple Unix commands together (specifically AIX), but I'm looking to do the following (only on local files):
1. Find all symbolic links that are not set up using absolute... (3 Replies)
Discussion started by: bdizenhouse
3 Replies
9. UNIX for Dummies Questions & Answers
I am trying to test arguments to see if they are files in any directory.
I have :
but it's not working (7 Replies)
Discussion started by: skooly5
7 Replies
10. Shell Programming and Scripting
First off, I know this is sort of a rehash of similar questions that have been asked in other closed threads, but I haven't been able to figure out how to apply the answers provided in those threads to my scenario and make it work.
I am working on a script in KSH on AIX 5.1 that will do a bulk... (1 Reply)
Discussion started by: derndingle
1 Replies
LEARN ABOUT DEBIAN
pvm_advise
ADVISE(3PVM) PVM Version 3.4 ADVISE(3PVM)
NAME
pvm_advise() - Controls use of direct task-to-task routing.
[In Version 3.2: Replaced by pvm_setopt]
SYNOPSIS
C int info = pvm_advise( int route )
Fortran call pvmfadvise( route, info )
PARAMETERS
route Integer advising PVM to set up direct task-to-task links.
route options
PvmDontRoute 1 Don't allow direct links to this task
PvmAllowDirect 2 Allow but don't request direct links
PvmRouteDirect 3 Request direct links
info Integer returning error status.
DESCRIPTION
The routine pvm_advise advises PVM on whether or not to set up direct task-to-task links (using TCP) for all subsequent communication. Once
a link is established it remains until the application finishes. If a direct link can not be established because one of the two tasks has
requested PvmDontRoute or because no resources are available, then the default route through the PVM daemons is used. pvm_advise can be
called multiple times to selectively establish direct links, but is typically set only once near the beginning of each task. PvmAllowDi-
rect is the default advise setting. This setting on task A allows other tasks to set up direct links to A. Once a direct link is estab-
lished between tasks both tasks will use it for sending messages. pvm_advise returns the error status in info. The performance of direct
task-to-task links can be up to a factor of two better than the default route. The draw back is a lack of scalability of the direct links.
Some versions of UNIX limit the number of links to no more than 30.
EXAMPLES
C:
info = pvm_advise( PvmRouteDirect );
Fortran:
CALL PVMFADVISE( PVMROUTEDIRECT, INFO )
ERRORS
This error condition can be returned by pvm_advise
PvmBadParam
giving an invalid route value.
SEE ALSO
pvm_setopt(3PVM)
30 August, 1993 ADVISE(3PVM)