Sponsored Content
Full Discussion: Ln usage question
Top Forums UNIX for Dummies Questions & Answers Ln usage question Post 302747281 by Don Cragun on Friday 21st of December 2012 02:43:35 AM
Old 12-21-2012
Quote:
Originally Posted by nerdcurious
Is it possible to assign a symbolic link to a network folder, without that folder being mounted?

Thanks!
The content of a symbolic link is a string. When the symbolic link is encountered while traversing a pathname, you will get an error if that string (when incorporated into the pathname being evaluated) doesn't resolve to a file of the type expected for the operation being performed. There is no requirement that the contents of the symbolic link can be used to access a file at the time the symbolic link is created.

If a symbolic link is not used in pathname expansion, you can use use readlink() (the function), readlink (the utility [not available on all systems]), or ls (the utility with the -l option), to read the contents of the symbolic link when it is not being used for its normal purpose.
 

10 More Discussions You Might Find Interesting

1. AIX

basic question about disk usage

how to i find out the disk usage on a server. say in windows examples its like C:/ D:/ and checking out the disk space. how can i find in Unix. can i just use df -k (3 Replies)
Discussion started by: karthikosu
3 Replies

2. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

3. Solaris

current CPU usage, memory usage, disk I/O oid(snmp)

Hi, I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP. I want the oids for above tasks. can you please tell me that Thank you (2 Replies)
Discussion started by: S_venkatesh
2 Replies

4. Shell Programming and Scripting

usage of sed question for experts

I need a little help with sed. Basically, I need to parse out selections from the output of hddtemp so conky can display some hdd temps for me. I have hddtemp in daemon mode so A simple 'nc localhost 7634' displays the following: $ nc localhost 7634... (3 Replies)
Discussion started by: audiophile
3 Replies

5. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

6. UNIX for Dummies Questions & Answers

rsync usage question

Hello folks; I'm using rsync on my Ubuntu servers to sync a remote folders on a remote machine to a local folders on a local machine. one thing i couldn't get to work is how to exclude folder. I know i'm suppose to use "exclude" argument but every time i do, i still see the excluded directory... (0 Replies)
Discussion started by: Katkota
0 Replies

7. Programming

Question about erand48 usage

Hi, Following is the trimmed down version of the code I'm using to generate a set of random numbers using erand48 #include <stdio.h> #include <stdlib.h> #include <math.h> main() { unsigned short xsubi; xsubi=10; double r; int x; int i=0,... (14 Replies)
Discussion started by: santosh_sugur
14 Replies

8. Shell Programming and Scripting

Question regarding sed usage

I have a html file with the following content:- <font face=verdana color=#000000>108946</font> <font face=verdana color=#000000>234346</font> I want to format the values inside the font tag using thousand separator. I have the following command which can be used for adding thousand... (4 Replies)
Discussion started by: Yoda
4 Replies

9. UNIX for Dummies Questions & Answers

Question on disk size and usage

Hello All, this may be a simple question but I wasn't sure how to word it to search for the answer. Have a look at the following: /dev/mapper/vgdata-lvdata 626G 594G 0 100% /data01 As you can see the disk size 626GB of which 594G is used. There's 32GB difference there but the... (5 Replies)
Discussion started by: bbbngowc
5 Replies

10. UNIX for Beginners Questions & Answers

Sed command usage question

How to work x in sed command? I know x command is swaps the contents of pattern space and hold space. But i am unable to understand it's working? (4 Replies)
Discussion started by: Vartika18
4 Replies
readlink(2)							   System Calls 						       readlink(2)

NAME
readlink - read the contents of a symbolic link SYNOPSIS
#include <unistd.h> ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsiz); DESCRIPTION
The readlink() function places the contents of the symbolic link referred to by path in the buffer buf which has size bufsiz. If the num- ber of bytes in the symbolic link is less than bufsiz, the contents of the remainder of buf are left unchanged. If the buf argument is not large enough to contain the link content, the first bufsize bytes are placed in buf. RETURN VALUES
Upon successful completion, readlink() returns the count of bytes placed in the buffer. Otherwise, it returns -1, leaves the buffer unchanged, and sets errno to indicate the error. ERRORS
The readlink() function will fail if: EACCES Search permission is denied for a component of the path prefix of path. EFAULT path or buf points to an illegal address. EINVAL The path argument names a file that is not a symbolic link. EIO An I/O error occurred while reading from the file system. ENOENT A component of path does not name an existing file or path is an empty string. ELOOP A loop exists in symbolic links encountered during resolution of the path argument. ENAMETOOLONG The length of path exceeds {PATH_MAX}, or a pathname component is longer than {NAME_MAX} while _POSIX_NO_TRUNC is in effect. ENOTDIR A component of the path prefix is not a directory. ENOSYS The file system does not support symbolic links. The readlink() function may fail if: EACCES Read permission is denied for the directory. ELOOP More than {SYMLOOP_MAX} symbolic links were encountered in resolving path. ENAMETOOLONG As a result of encountering a symbolic link in resolution of the path argument, the length of the substituted pathname string exceeded {PATH_MAX}. USAGE
Portable applications should not assume that the returned contents of the symbolic link are null-terminated. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |Async-Signal-Safe | +-----------------------------+-----------------------------+ SEE ALSO
stat(2), symlink(2), attributes(5), standards(5) SunOS 5.10 1 Dec 2003 readlink(2)
All times are GMT -4. The time now is 10:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy