Sponsored Content
Full Discussion: geting the real path
Top Forums Shell Programming and Scripting geting the real path Post 302258326 by chebarbudo on Friday 14th of November 2008 10:51:39 AM
Old 11-14-2008
MySQL

Here is another solution that I just found:
Code:
sudo aptitude install realpath
realpath -s /home/../var/./run//motd
/var/run/motd


Last edited by chebarbudo; 02-11-2009 at 04:10 AM..
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

geting server name(ipaddress)

hi, can any one say how to get the server name if we know the ipaddress ie nslookup gives ipaddress if server name is given in the same way can i have server name if i know ipaddress thanks & regards babu :o (1 Reply)
Discussion started by: babu@shell
1 Replies

2. Solaris

I am geting error while trying to stop managed server of WEB LOGIC

Dear All, I am geting error while trying to stop managed server of WEB LOGIC through the command stop_wls managed1_wlsdom02.Can anyone tell me why I am geting this error?managed1_wlsdom02.pid exists at the path mentioned. Do you need any other details?... (0 Replies)
Discussion started by: ASHISH MISHRA
0 Replies

3. Shell Programming and Scripting

geting user input from php and using perl for execution

I am using festival speech synthesis system and I would like to allow user input in a browser. This will be taken by a php page which is then supposed to pass the input text to a perl script. The perl script should pass this text to the festival engine by executing a unix command. this in turn... (2 Replies)
Discussion started by: wairimus
2 Replies

4. UNIX for Advanced & Expert Users

Getting real path to directory

Hi friends, Need your help. The question is: 1) We have directory '/SomeDirectory/SubDirectory' 2) And have symlink pointing to it like '/AnotherOneDirectory/symlink' '/AnotherOneDirectory/symlink' -> '/SomeDirectory/SubDirectory' 3) Need to get real path without symlinks knowing only... (7 Replies)
Discussion started by: kandrewo
7 Replies

5. Shell Programming and Scripting

geting a value out of awk script

the value of flag is reset inside the awk statments and is not getting echoed out of it. how can this be done?? #!/bin/ksh flag=0 awk -F '' '$2 == "ABCD" && $6 == "MNOP"{flag=1}' file.xml echo $flag I am always getting the value of flag as "0" , even after the $2 is "ABCD" and $6 is... (2 Replies)
Discussion started by: skyineyes
2 Replies

6. AIX

Geting a value dynamically from topas

Hi all, I got an idea to get a value (like Syscall or %comp details for example)dynamically from topas. Is there any way to do this. I guss there must be some door opened for this. I tried running topas and redirecting to a file but in vain. The idea is, script should run topas in... (4 Replies)
Discussion started by: jayadeava
4 Replies

7. UNIX for Advanced & Expert Users

Kernel Modules Not geting built

I installed in VM the Mandriva Linux with 2.6.27 kernel. But presently when I fire make the modules .ko does not get built. I get the following output on firing command in the kernel module folder. $ make Building first_driver.c ... make: Entering directory... (1 Reply)
Discussion started by: rupeshkp728
1 Replies

8. Shell Programming and Scripting

Not able to find the perfect code...Geting confused in between

I have to find last delimiter in each line of a file and store the value after the last '/' in a variable in ksh script...Pls Pls help me:(The file is as shown below: /opt/apps/cobqa/apps/abadv/bind/advc0007.bnd /opt/apps/cobqa/apps/abbrio/bind/naac6115.bnd... (5 Replies)
Discussion started by: bhavanabahety
5 Replies

9. UNIX for Dummies Questions & Answers

How to get real path to a file?

Hello, I need download a mp3 file from a site but I can not find the actual link. Thanks. Source codes <span title="what is" class="read"><embed type="application/x-shockwave-flash" src="au/audio.swf" width="17" height="13" align="texttop" quality="high" loop="false" menu="false"... (1 Reply)
Discussion started by: tara123
1 Replies
realpath(3C)						   Standard C Library Functions 					      realpath(3C)

NAME
realpath - resolve pathname SYNOPSIS
#include <stdlib.h> char *realpath(const char *restrict file_name, char *restrict resolved_name); DESCRIPTION
The realpath() function derives, from the pathname pointed to by file_name, an absolute pathname that names the same file, whose resolution does not involve ".", "..", or symbolic links. The generated pathname is stored as a null-terminated string, up to a maximum of {PATH_MAX} bytes (defined in limits.h(3HEAD)), in the buffer pointed to by resolved_name. RETURN VALUES
On successful completion, realpath() returns a pointer to the resolved name. Otherwise, realpath() returns a null pointer and sets errno to indicate the error, and the contents of the buffer pointed to by resolved_name are left in an indeterminate state. ERRORS
The realpath() function will fail if: EACCES Read or search permission was denied for a component of file_name. EINVAL Either the file_name or resolved_name argument is a null pointer. EIO An error occurred while reading from the file system. ELOOP Too many symbolic links were encountered in resolving file_name. ELOOP A loop exists in symbolic links encountered during resolution of the file_name argument. ENAMETOOLONG The file_name argument is longer than {PATH_MAX} or a pathname component is longer than {NAME_MAX}. ENOENT A component of file_name does not name an existing file or file_name points to an empty string. ENOTDIR A component of the path prefix is not a directory. The realpath() function may fail if: ENAMETOOLONG Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}. ENOMEM Insufficient storage space is available. USAGE
The realpath() function operates on null-terminated strings. Execute permission is required for all the directories in the given and the resolved path. The realpath() function might fail to return to the current directory if an error occurs. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
getcwd(3C), limits.h(3HEAD), sysconf(3C), attributes(5), standards(5) SunOS 5.11 9 Oct 2003 realpath(3C)
All times are GMT -4. The time now is 08:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy