Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 02-21-2011, 04:51 AM   #1
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
l=`echo $k|tr '\023' ' '`
cd "$l"
if [ $? = "0" ]
$0 $1
cd ..

but it aint workn.any help wud be highly appreciated.thanks a lot.
Old 02-21-2011, 07:02 AM   #2
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:28 AM.

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