Find unix path to a file?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Find unix path to a file?
# 1  
Old 10-21-2009
Find unix path to a file?

I know this is very newbie ... but I need help determining the proper file path to file...Have no idea how to do this

I'm on a Mac OS X 10.6 Snow Leopard

thanks very much
# 2  
Old 10-21-2009
if you dont know where the file is at all, you can do
Code:
sudo find / -name "filename"

You would do sudo to make sure all directories are traversed. You have to be an admin to be part of the sudoers group, for sudo to work, otherwise you would have to have an admin log in and edit the /etc/sudoers file to add you or add you to the admin group. If you know the file is somewhere under /Library, then use that instead of just "/". Find is a pretty slow command in my opinion, and you want to narrow the search down if you can. If you want to know your current path you could do pwd (print working directory).
# 3  
Old 10-21-2009
thanks

if I have a file installed in the root of a website domain - Example Web Page - what would the typical unix path be? I'm just trying to get a forum up and running and they are asking for this: // Unix path to the forum directory. Do not include a trailing slash - the file is within a folder called "forum" - don't know why this is so difficult, but I guess it is...thanks again
# 4  
Old 10-26-2009
I think it is usually /var/www/html
# 5  
Old 10-28-2009
Hello,

Document root on OSX is as follows:

From the httpd.conf file located at:


Code:
/etc/apache2/httpd.conf



Code:
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/Library/WebServer/Documents/"



HTH,

Abacus
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find and Replace Path in UNIX

Hi All, How can i find and replace the one path to another path with in the file. For Example: Search_path=/search/path replace_path=/replace/path I used the following command but not usefull, please help me regarding the same. sed 's_/search/path_/replace/path_' file_name >... (6 Replies)
Discussion started by: nsyed.dw
6 Replies

2. Shell Programming and Scripting

How to a find a file in which path it is there?

Hi Firends, Good Morning to all, I want a find command to search a paticular file present in my system(ie search through under all users and all directories.) I am looking forward from you.:) Advance Thanks, Siva Ranganath CH (3 Replies)
Discussion started by: sivaranga001
3 Replies

3. UNIX for Dummies Questions & Answers

how to find a path within unix root directory

I need to know whether nyfile/mypath exists on the file system in the root directory. How to do this (1 Reply)
Discussion started by: ramky79
1 Replies

4. UNIX for Dummies Questions & Answers

find locked files, print file path, unlock file

using OS X and the Terminal, I'd like to find all locked files in a specified directory, unlock them, and print a list of those files that were unlocked how can I do this? I'm familiar with chflags nouchg for unlocking one file but not familiar with unix enough to do what I'd like. Thanks! (0 Replies)
Discussion started by: alternapop
0 Replies

5. Shell Programming and Scripting

Find a path of a specific file

Hi, A variable value is /home/samir/datas/data.txt I want /home/samir/datas. How can I get that. (11 Replies)
Discussion started by: samir_standing
11 Replies

6. UNIX for Dummies Questions & Answers

how to find complete path of a file in unix

hi experts(novice people can stay away as it is no child's game), i am developing a script which works like recycle bin of windows. the problem i am facing is that when ever i am trying to delete a file which is situated in parent directory or parent's parent directory i am unable to capture... (5 Replies)
Discussion started by: yahoo!
5 Replies

7. UNIX for Advanced & Expert Users

how to find complete path of a file in unix

hi experts(novice people can stay away as it is no child's game), i am developing a script which works like recycle bin of windows. the problem i am facing is that when ever i am trying to delete a file which is situated in parent directory or parent's parent directory i am unable to capture... (1 Reply)
Discussion started by: yahoo!
1 Replies

8. Shell Programming and Scripting

how to find the path of a file?

Hi all, Is there any way to find the the path of a file? I mean executable files and just anyother file we can think of? i know of one cmd called which $which mount /usr/bin/mount this is fine, but "mount" is a cmd not a file that can be searched eg: say i have created a text file... (3 Replies)
Discussion started by: wrapster
3 Replies

9. Shell Programming and Scripting

Find a file in sub-directories.. o/p just the path

Hello All, I am somehow stumped with this ting. 'Find' will sure show me.. but I want only thepath of all the occurences of the file in any of the sub-dirs.. Any help will be sincerely appreciated. thanx! (3 Replies)
Discussion started by: pranavagarwal
3 Replies

10. HP-UX

URGENT: UNIX FTP cannot find path error

Dear all We are currently working on to install some ERP system in wjhich we need to FTP from unix to windows 2000 machine We run ./lodrun to get files from d/xxxxx/xxxx directory but the ftpoutput.log file shows following error FTP: xxxxxxxxx system cannot find the path specified... (1 Reply)
Discussion started by: minix
1 Replies
Login or Register to Ask a Question