12-22-2009
ls -L executes the readlink system call. Meaning it translates the link "name" to the real name of the file.
You may have noticed that a link file is only a few bytes. It is literally just text that references another file.
9 More Discussions You Might Find Interesting
1. Linux
My system bench mark results
INDEX VALUES
TEST BASELINE RESULT INDEX
Arithmetic Test (type = double) 2541.7 876123.7 344.7
Dhrystone 2 without register variables 22366.3 5411602.3 ... (1 Reply)
Discussion started by: chandra s
1 Replies
2. Linux Benchmarks
Hi,
I was trying to build Linux Benchmarks with latest Intel C++ Compiler.
When I used -ipo (inter-procedural optimization) option, arithmetic test (arith.c) failed on execution.
The problem is Intel compiler's advanced optimization option (-ipo) optimizes much more than expected and this... (50 Replies)
Discussion started by: cpjain
50 Replies
3. Shell Programming and Scripting
Hello,
I am using suse 10.1 and isql from unixodbc to connect to a MS SQL server. I got everything to work fine. What do I need to unload the results from the sql to a file? I attempted to put unload to in my sql statement but got a error. I don't see in the isql help where it has a option to... (0 Replies)
Discussion started by: benefactr
0 Replies
4. Shell Programming and Scripting
Here is my script:
#
# Capture the current directory.
export -p CurrentDir="`pwd`"
echo $CurrentDir
#
# Capture the new directory name in the form YYYYMMDD.
export -p DateDir="`date +"%Y%m%d"`"
echo $DateDir
#
# Store the desired target directory.
export -p... (6 Replies)
Discussion started by: imprimisxo
6 Replies
5. Shell Programming and Scripting
hello everyone,
i really need your help to write a script which would just print following kind of result into a text file (result.txt)
XYZ test Results
ID: <unique-id> Date: <date>
-------------------------------------------------
| Task | Result | Time |... (3 Replies)
Discussion started by: viriimind
3 Replies
6. UNIX and Linux Applications
Hello,
This is my first post and its because I could not find solution for myself I decided to ask help here.
What I want to do;
I want to get some data from a table 1 on server 1 and insert those datas into a table 2 on server 2. ( lets say schema names are server1 and server 2 also ).... (10 Replies)
Discussion started by: azuahaha
10 Replies
7. Shell Programming and Scripting
Hello ,
When using vim, can ctag and cscope support recording search results and displaying the history results ? Once I jump to one tag, I can use :tnext to jump to next tag, but how can I display the preview search result? (0 Replies)
Discussion started by: 915086731
0 Replies
8. UNIX for Dummies Questions & Answers
I am trying to sort a file . The file looks like this:
DDFF 2 /ztpfrepos/pgr/load
DDFQ 2 /ztpfrepos/pgr/load
DDFX 2 /ztpfrepos/pgr/load
DDUA 2 /ztpfrepos/pgr/load
My command:
sort -k1 /home/c153507/Bin/OPL1.txt -o /home/c153507/Bin/OPL1.txt
The results are OK except for one line where... (4 Replies)
Discussion started by: Yahalom
4 Replies
9. Shell Programming and Scripting
Hi,
I am new to linux...
How to Assign SQL Query Results to Variables in Linux,i want ti generate it in param files, Can anyone please explain me.
Ex: SQL> Select * from EMP;
O/P: Emp_No Emp_Name
1 AAA
2 BBB
3 CCC
and I want expected... (5 Replies)
Discussion started by: Sravana Kumar
5 Replies
LEARN ABOUT SUNOS
readlink
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)