LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-21-2011, 04:51 AM   #1
deeppal123
LQ Newbie
 
Registered: Feb 2011
Posts: 10

Rep: Reputation: 0
prob of find


well i need to solve this one:
. Find a file location in current directory(recursive directory) without using find command.

i have tried something like this but it just doesnt help,and please dont tell abt the locate command ,i dont want to use that one as well.
i have tried something like this:

b=`ls -F|grep /|tr '\ ' '\023'|tr / ' '`
for k in $b
do
l=`echo $k|tr '\023' ' '`
cd "$l"
if [ $? = "0" ]
then
$0 $1
cd ..
fi
done

but it aint workn.any help wud be highly appreciated.thanks a lot.
 
Old 02-21-2011, 07:02 AM   #2
mikelist
LQ Newbie
 
Registered: Dec 2005
Posts: 11

Rep: Reputation: 0
how about calling "ls -R (starting directory)(expression)" ? would have to be lower on the directory tree than the file you are looking for, but that shouldn't pose a problem, although i'm not a coder.

Last edited by mikelist; 02-22-2011 at 03:26 PM. Reason: correct command format
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
red hat 9, printer prob and connection prob lasttriptotulsa Linux - Newbie 4 01-17-2007 03:39 AM
find / -gid 501 = prob HadesThunder Linux - Newbie 2 04-10-2004 03:01 PM
XFree keyboard problem, Quake prob and half-life prob cradlebin Linux - Software 0 09-21-2003 06:57 AM
Man 9.0 printer ? hardware prob ? install prob romcgill Linux - Hardware 2 02-24-2003 04:54 AM
PAM prob... can't find certain file Newbulus_Maximu Linux - General 0 09-08-2002 12:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration