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 > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Linux Shell Question: how to print the shell script name ? meili100 UNIX for Dummies Questions & Answers 3 07-01-2008 01:55 PM
shell question convenientstore Shell Programming and Scripting 2 06-03-2007 05:05 PM
#!/bin/sh shell question GCTEII Shell Programming and Scripting 0 02-23-2006 03:08 AM
AWK question in the KORN shell penfold Shell Programming and Scripting 11 02-09-2005 09:14 AM
Question about Korn Shell Latha Nair Shell Programming and Scripting 13 11-05-2003 07:30 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-02-2002
anjanb2 anjanb2 is offline
Registered User
  
 

Join Date: Jul 2002
Location: India
Posts: 1
Post Shell question

In Unix, How to find the file when i have the matter by subdirectory wise.

I have used the 'grep' command, but i can't get it, can anyone give the command of matter searched by subdirectorywise.



Last edited by anjanb2; 07-02-2002 at 10:36 AM..
  #2 (permalink)  
Old 07-02-2002
auswipe's Avatar
auswipe auswipe is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2001
Location: Wide Awake Wylie, Texas
Posts: 535
I didn't quite understand your question, but I assume that you are looking for a file in a sub-directory.

If this is the case, then take a look at `man find`. find can recursively go down sub-directories look for a file.

If you want to grep for a group of files in nested sub-directories then you should take a look at the -r option of grep.
  #3 (permalink)  
Old 07-02-2002
janr janr is offline
Registered User
  
 

Join Date: Jun 2002
Location: Amsterdam (Netherlands)
Posts: 142
also you can use

the command :
>> grep <string> */*

it search in the current directorie and al directories below it (1 level)

otherwise you can doe it with a complex find command
  #4 (permalink)  
Old 07-02-2002
sskb
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
hi
I guess u need "find"

you can get more info with

man find

good luck!
sskb
  #5 (permalink)  
Old 07-02-2002
killerserv's Avatar
killerserv killerserv is offline Forum Advisor  
Unix Predator
  
 

Join Date: Dec 2000
Location: Phoenix, AZ
Posts: 670
you can use find command with -noleaf pattern, which will find in subdirectory wise. give a try.
  #6 (permalink)  
Old 07-03-2002
Nisha Nisha is offline
Registered User
  
 

Join Date: Jun 2002
Location: Chennai, India
Posts: 110
grep basically searches for a pattern or a string. it can not be used for finding files. Find command would help in finding the files.

Refer to the man command.
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 04:19 PM.


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