The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
command to find the path of a file abhilashnair UNIX for Dummies Questions & Answers 3 02-17-2008 07:15 PM
to find the file with full path surjyap Shell Programming and Scripting 5 01-18-2008 03:26 PM
Find a file in sub-directories.. o/p just the path pranavagarwal Shell Programming and Scripting 3 11-23-2007 01:50 AM
vi - replacing a relative path with absolute path in a file Yinzer955i UNIX for Dummies Questions & Answers 2 09-07-2006 11:47 AM
How would I make a find command NOT show the path of a file? LordJezo Shell Programming and Scripting 1 10-01-2004 06:01 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-26-2008
wrapster wrapster is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 193
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 called "myfile"
i dont know the path to it, how do i find it?

Thanks
  #2 (permalink)  
Old 03-26-2008
Shivdatta Shivdatta is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 73
refer man find....

Code:
find / -name "filename" 2>/dev/null
  #3 (permalink)  
Old 03-26-2008
danmero danmero is online now Forum Advisor  
  
 

Join Date: Nov 2007
Location: 45.48-73.63
Posts: 1,420
man find or take a look here: advanced/complex uses of the find command
  #4 (permalink)  
Old 03-26-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
And if you have locate, your disk will already be indexed every night, so no need to run a heavy-duty on-line find command at all (unless it's a file you created recently).
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:15 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0