10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
2. UNIX for Dummies Questions & Answers
Hello,
I'm having a trouble with the find cmd.
I would like to find all the java versions on my systems.
I have solaris 9 & 10 RHEL and SUSIE.
java -version
doesn't give all the versions on the server.
So I am trying to use the find command to find them all
find / -name java
I would... (7 Replies)
Discussion started by: bitlord
7 Replies
3. Solaris
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
4. Shell Programming and Scripting
Hi gurus, greetings.
Objective: find in a path directories that are named Logs. In each found Logs dir search for files with .log extension and remove -atime +6. (Note for test/example, rm and -atime is not used).
Issue: If I execute the script without redirecting output to a file, on... (8 Replies)
Discussion started by: rsheikh
8 Replies
5. Shell Programming and Scripting
Hi All,
My target is to find the biggest files opened by any process and from that i have to find process id and the corresponding file also to avoid file system being hung-up.
Finding the process id: is to kill the process
Finding the biggest file: is to remove the file
To get the process... (0 Replies)
Discussion started by: Arunprasad
0 Replies
6. Shell Programming and Scripting
Hi
for today i have 10 files, in that i need search some values how can i write a find cmd with
perticular date
thanks
SAIC (4 Replies)
Discussion started by: saic
4 Replies
7. Shell Programming and Scripting
I am trying to copy 2 types of files so I can archive them. I tested with a set of commands:
touch -t $(date -d "-60 day" +%Y%m%d) WORKDIR/REF
find TARGETDIR/ -type f -maxdepth 1 -iname \*.out\* -or -iname \*.log\* ! -newer WORKDIR/REF -exec ls -l {} \;
This correctly lists any files in the... (2 Replies)
Discussion started by: prismtx
2 Replies
8. Shell Programming and Scripting
i have a list of files below:
rwxrwxrwx 1 pipe pipe 180 Mar 4 22:47 del_0n_Date
-rwxrwxrwx 1 pipe pipe 472 Mar 4 22:58 mail_Check
-rw-r--r-- 1 pipe pipe 92 Mar 4 22:58 minfo.txt
-rwxrwxrwx 1 pipe pipe 609 Mar 5 05:12... (6 Replies)
Discussion started by: ali560045
6 Replies
9. Shell Programming and Scripting
Hi,
i wan to search the file starting with Admin into the directory Output. I am running below command:
find /appl/Output -name "Admin*" -prune
but this command is going into the sub directories present under output. I do not want to search under sub directories. Any help will be highly... (6 Replies)
Discussion started by: Vishal123
6 Replies
10. UNIX for Dummies Questions & Answers
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
resolvepath(2) System Calls resolvepath(2)
NAME
resolvepath - resolve all symbolic links of a path name
SYNOPSIS
#include <unistd.h>
int resolvepath(const char *path, char *buf, size_t bufsiz);
DESCRIPTION
The resolvepath() function fully resolves all symbolic links in the path name path into a resulting path name free of symbolic links and
places the resulting path name in the buffer buf which has size bufsiz. The resulting path name names the same file or directory as the
original path name. All ``.'' components are eliminated and every non-leading ``..'' component is eliminated together with its preceding
directory component. If leading ``..'' components reach to the root directory, they are replaced by ``/''. If the number of bytes in the
resulting path name is less than bufsiz, the contents of the remainder of buf are unspecified.
RETURN VALUES
Upon successful completion, resolvepath() 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 resolvepath() function will fail if:
EACCES Search permission is denied for a component of the path prefix of path or for a path prefix component resulting
from the resolution of a symbolic link.
EFAULT The path or buf argument points to an illegal address.
EIO An I/O error occurred while reading from the file system.
ENOENT The path argument is an empty string or a component of path or a path name component produced by resolving a sym-
bolic link does not name an existing file.
ELOOP Too many symbolic links were encountered in resolving path.
ENAMETOOLONG The length of path exceeds PATH_MAX, or a path name component is longer than NAME_MAX. Path name resolution of a
symbolic link produced an intermediate result whose length exceeds PATH_MAX or a component whose length exceeds
NAME_MAX.
ENOTDIR A component of the path prefix of path or of a path prefix component resulting from the resolution of a symbolic
link is not a directory.
USAGE
No more than PATH_MAX bytes will be placed in the buffer. Applications should not assume that the returned contents of the buffer are null-
terminated.
SEE ALSO
readlink(2), realpath(3C)
SunOS 5.10 12 May 1997 resolvepath(2)