Sponsored Content
Top Forums UNIX for Dummies Questions & Answers command to find the absolute path Post 302347248 by Franklin52 on Tuesday 25th of August 2009 08:44:27 AM
Old 08-25-2009
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

vi - replacing a relative path with absolute path in a file

Hi, I have a file with about 60 lines of path: app-defaults/boxXYZ....... I want to change this to /my/path/goes/here/app-defaults/boxXYZ, but of course vi doesn't like the regualr :s/old/new/ command. Is there any other quick way to do this? Thanks ;) (2 Replies)
Discussion started by: Yinzer955i
2 Replies

2. Programming

absolute path

How to find out the absolute path of a file in C/C++? Thanks (4 Replies)
Discussion started by: filedeliver
4 Replies

3. UNIX for Dummies Questions & Answers

absolute path

is cd ~ considered an absolute path? (2 Replies)
Discussion started by: Kirichiko
2 Replies

4. Shell Programming and Scripting

find & copy files with absolute path

hi all, can i get script find file & copy that file with path for an example sourse : /home/abc/ destination : /home/backup/ files which need to find : tmp* copy these files with its absolute path inside like :- /home/abc/x/y/z/tmp.txt to /home/backup/date/x/y/z/tmp.txt thanks in... (15 Replies)
Discussion started by: jagnikam
15 Replies

5. UNIX for Dummies Questions & Answers

Help with absolute path and relative path

I'm having problems accessing the Knoppix software on my current computer and the replacement CD I ordered hasn't arrived yet. I have a guess at what the answer would be for this question but I am not sure as I cannot test it with the software. I have to create a directory called class, and... (1 Reply)
Discussion started by: mzero
1 Replies

6. Shell Programming and Scripting

absolute path for a script ran with relative path

I have a script in which i want to print absolute path of the same script irrespective of path from where i run script. I am using test.sh: echo "pwd : `pwd`" echo "script name: $0" echo "dirname: `dirname $0`" when i run script from /my/test/dir/struct as ../test.sh the output i... (10 Replies)
Discussion started by: rss67
10 Replies

7. Shell Programming and Scripting

How to change Absolute path to Relative path

Hello, I have a doubt:- --------------------- Current script:- ################################################################################################ prefix=user@my-server: find . -depth -type d -name .git -printf '%h\0' | while read -d "" path ; do ( cd "$path" || exit $?... (4 Replies)
Discussion started by: sahil_jammu
4 Replies

8. UNIX for Dummies Questions & Answers

How to convert relative path to absolute path?

Hello Everyone, I want to convert Relative Path - /home/stevin/data/APP_SERVICE/../datafile.txt to Absolute Path - /home/stevin/data/datafile.txt Is there a built-in tool in Unix to do this or any good ideas as to how can I implement this. -Steve (5 Replies)
Discussion started by: qwarentine
5 Replies

9. Shell Programming and Scripting

Tar command to take absolute path

Hi All, I am trying to create a tar from absolute path then transfer that file to another machine. But tar is not taking the absolute (full) path. Could you please help. I tried tar -cvf option at source and tar -xvf option at destination My variable has 3 files with full path... (2 Replies)
Discussion started by: sdosanjh
2 Replies

10. UNIX for Beginners Questions & Answers

Convert Relative path to Absolute path, without changing directory to the file location.

Hello, I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies
chroot(2)							System Calls Manual							 chroot(2)

NAME
chroot() - change root directory SYNOPSIS
DESCRIPTION
causes the named directory to become the root directory, the starting point for path searches for path names beginning with path points to a path name naming a directory. The user's working directory is unaffected by the system call. The entry in the root directory is interpreted to mean the root directory itself. Thus, cannot be used to access files outside the subtree rooted at the root directory. Security Restrictions The effective user ID of the process must be a user with the privilege to change the root directory. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUE
returns the following values: Successful completion. Failure. is set to indicate the error. ERRORS
fails and the root directory remains unchanged if one or more of the following is true: Any component of the path name is not a directory. The named directory does not exist or a component of the path does not exist. The effective user ID is not a user who has the privilege. path points outside the allocated address space of the process. The reliable detection of this error is implementation dependent. The length of the specified path name exceeds bytes, or the length of a component of the path name exceeds bytes while is in effect. Too many symbolic links were encountered in translating the path name. WARNINGS
Obsolescent Interfaces is to be obsoleted at a future date. SEE ALSO
chroot(1M), chdir(2), privileges(5). STANDARDS CONFORMANCE
TO BE OBSOLETED chroot(2)
All times are GMT -4. The time now is 12:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy