Find the location of particular file and directory


 
Thread Tools Search this Thread
# 1  
Old 02-21-2013
Find the location of particular file and directory

hi all,

i am new to UNIX environment.

i have a file and directory with same name, i don't know the location

I want to find location of that file and directory.

please suggest a solution.

Last edited by joeyg; 02-21-2013 at 10:47 AM..
# 3  
Old 02-21-2013
thanks for ur quick reply.

i have tried and succeeded in finding file and directory in two different queries.

but i don't know how to find those two in single query.Smilie

---------- Post updated at 07:41 PM ---------- Previous update was at 06:59 PM ----------

anybody please suggest me
# 4  
Old 02-21-2013
For that you would have to be more explicit:
The easiest being by showing us the 2 command you used, and say you the same result in one command line... Smilie
# 5  
Old 02-21-2013
Code:
find . -type d -name "siva"

---------- Post updated at 07:59 PM ---------- Previous update was at 07:55 PM ----------

Code:
find . -name 'siva'

# 6  
Old 02-21-2013
I always thought your second code would give both... Is it not the case? So what OS are you using then?

What is the output of ?
Code:
 find .  -name 'siva' -exec ls -ld {} \;

 

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
How to find and get a file in an entire directory with an excluded directory specified? abdulbadii UNIX for Beginners Questions & Answers 2 03-22-2018 07:14 AM
Find and Copy file of specific location yadavricky Shell Programming and Scripting 6 03-26-2015 01:54 PM
How to find a word and move it a specific location in xml file using perl? harpal singh Shell Programming and Scripting 3 03-07-2013 02:57 PM
How to find a existing file location and directory location in Solaris box? buzzme Shell Programming and Scripting 1 01-10-2013 09:13 PM
using find to go directly into a directory location bjhum33 Shell Programming and Scripting 3 04-04-2012 01:31 AM
Get up one directory of location as variable cielle Red Hat 5 03-29-2012 02:22 PM
How to copy a file from one location to another location? vel4ever Shell Programming and Scripting 1 01-12-2012 05:29 AM
How to find a file if we dont know exact location of file ? tusharjoshi UNIX for Dummies Questions & Answers 9 01-04-2012 05:37 PM
File created in a different location instead of desired location on using crontab archana.n Shell Programming and Scripting 1 10-20-2011 04:47 AM
Put one string from one location to another location in a file jimmy_y Shell Programming and Scripting 1 11-24-2009 01:08 PM
write a directory location fadista UNIX for Dummies Questions & Answers 1 04-15-2009 09:08 AM
Find a pattern in a file at a particular location sparks Shell Programming and Scripting 1 02-22-2009 03:13 AM
how to find a file named vijay in a directory using find command amirthraj_12 UNIX for Dummies Questions & Answers 6 10-25-2008 01:37 PM
Copy directory from one location to other rakeshvthu UNIX for Dummies Questions & Answers 2 09-23-2008 06:36 PM
how to find Script file location inside script asami Shell Programming and Scripting 10 03-15-2006 12:57 AM