Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

d_path(9) [suse man page]

D_PATH(9)							   The Linux VFS							 D_PATH(9)

NAME
d_path - return the path of a dentry SYNOPSIS
char * d_path(const struct path * path, char * buf, int buflen); ARGUMENTS
path path to report buf buffer to return value in buflen buffer length DESCRIPTION
Convert a dentry into an ASCII path name. If the entry has been deleted the string " (deleted)" is appended. Note that this is ambiguous. Returns a pointer into the buffer or an error code if the path was too long. Note: Callers should use the returned pointer, not the passed in buffer, to use the name! The implementation often starts at an offset into the buffer, and may leave 0 bytes at the start. "buflen" should be positive. COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 D_PATH(9)

Check Out this Related Man Page

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)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

expanding dotted paths to absolute ones in bash or sh

I have a little script to help me manage a gallery of image files. It makes symbolic links to every file in and below the current directory, placing them in a target directory which is passed to the script as a parameter. Unfortunately, the script pukes when I pass a parameter that contains... (4 Replies)
Discussion started by: TanRanger
4 Replies

2. Programming

find the fully-qualified path for the app my module is running in

Hi- I need the cpp call that will tell me the full path to the app I'm running in. For example, I'm running in a loaded library for either mozilla or firefox, but would like to know the full path to the executable /usr/bin/firefox /usr/bin/mozilla /usr/local/firefox1_5 etc... (For... (4 Replies)
Discussion started by: erwinfletch
4 Replies

3. UNIX for Dummies Questions & Answers

Edited Path in Profile File

Definitely a unix dummy. I edited the paths in the /etc/profile file - following the instructions on an install package. Now can't use vi, cat pg ls or any other unix commands. Guess I'm in big trouble. Path reads MANPATH=/opt/hpnp/man PATH=/opt/hpnpl/bin LD_LIBRARY_PATH=/opt/hpnp/lib ... (4 Replies)
Discussion started by: thewetch
4 Replies

4. Shell Programming and Scripting

check if specified path is in $PATH

echo $PATH | grep "\/usr\/ucb" is not working using sh-posix The problem is very simle. I want to check '/usr/ucb' is in the PATH environment variable. If i simply grep '/usr/ucb' i might got wrong result eg '/usr/ucb/bin'. After the path an end of line or colon character should be. In... (4 Replies)
Discussion started by: fpeter75
4 Replies

5. Solaris

Solaris9 - qlogic HBAs - luxadm reports "Found path to 0 HBA ports"

Hi All, I'm actually trying to configure a Qlogic HBA on a solaris9 connecting in a Brocade SAN. I installed Solaris9 and now trying to look at FC devices.. bash-2.05# luxadm -e port Found path to 0 HBA ports bash-2.05# luxadm probe No Network Array enclosures found in /dev/es... (7 Replies)
Discussion started by: ilan
7 Replies

6. UNIX for Dummies Questions & Answers

Getting Storage Device Sizes and Paths

What I'm Doing: I'm developing a python script that scans for all storage devices and their respective sizes. Python does not have a command that returns the /dev paths of storage devices or the respective sizes. So, I need to pipe a shell command to python. The Problem: In root, I've used... (4 Replies)
Discussion started by: codecellar
4 Replies

7. Shell Programming and Scripting

Switching hosts and paths

Hi all, Currently I work with two different hosts, one linux and one hp unix but with two separate versions of java installed (for a reason). The problem is: within the PATH there is already a /bin/java version installed i.e. when I do a printenv PATH it lists it as you'd expect. When I use... (6 Replies)
Discussion started by: cyberfrog
6 Replies

8. Solaris

Understand PATH

I'm new to unix so sorry for the confusing question. I installed OPENSSL following these instructions. Installing OpenSSH Packages - SPARC and Intel/Solaris 8 I need to run this command, "openssl req -newkey rsa:1024 -keyout server.pf.key -out req.pem" from a keyreq folder I created. ... (13 Replies)
Discussion started by: Kjons76
13 Replies

9. Solaris

Removing Dead Paths And Unusable Path Solaris 9

Hi, One of our Solaris servers was peviously zoned and connected to 2 seperate arrays, one HP and the other EMC. The server is now only connected to the EMC. The sever has x2 single port HBA's. When running cfgadm I see the following: root@qwicprod /dev/rdsk]# cfgadm -al Ap_Id Type... (6 Replies)
Discussion started by: jamba1
6 Replies

10. Solaris

add PATH as root

Sorry this maybe a dumb one, but I am root and want to add something to my PATH. Is the right place to do it here: /usr/dt/config/dtspcdenv ? If so, after I add it, how do I source it? Neither "source <file>" nor ". <file>" work. How does the above file work... is there another... (5 Replies)
Discussion started by: steve701
5 Replies

11. Shell Programming and Scripting

KSH - Find paths of multiple files in CC (dir and sub-dir))

Dear Members, I have a list of xml files like abc.xml.table prq.xml.table ... .. . in a txt file. Now I have to search the file(s) in all directories and sub-directories and print the full path of file in a output txt file. Please help me with the script or command to do so. ... (11 Replies)
Discussion started by: Yoodit
11 Replies

12. Shell Programming and Scripting

Solaris Server dectects EMC dead path and send mail immediately

taus-itcapp1#powermt display dev=all Pseudo name=emcpower0a CLARiiON ID=APM00105201788 Logical device ID=60060160B2202B001094F0E0AF5CE011 state=alive; policy=CLAROpt; priority=0; queued-IOs=0; Owner: default=SP A, current=SP A Array failover mode: 1 ... (6 Replies)
Discussion started by: orafup
6 Replies

13. UNIX for Dummies Questions & Answers

How to add path to root user

I am trying to add path for root. In /etc directory there is no .bash_profile file it has only profile file can any one say how to add path for root user ? is it possible to add path in profile file for root user. (18 Replies)
Discussion started by: elango963
18 Replies

14. Solaris

Find path of executable having problem

Hi cannot find the path to a running process on a host. I looked and tried some suggestions in forums to no avail. can someone please help? I need to know where this process is starting from as we have several versions in multiple directories --------- Process name 1201 1 0 Feb 14 ?... (14 Replies)
Discussion started by: mnassiri
14 Replies

15. Shell Programming and Scripting

Moving files from parent path to multiple child path using bash in efficient way

Hi All, Can you please provide some pointers to move files from Base path to multiple paths in efficient way.Folder Structure is already created. /Path/AdminUser/User1/1111/Reports/aaa.txt to /Path/User1/1111/Reports/aaa.txt /Path/AdminUser/User1/2222/Reports/bbb.txt to... (6 Replies)
Discussion started by: karthikgv417
6 Replies