Login
Search   Moderators Wanted: If you're interested please send your portfolio to info[at]itechforums.com
Welcome to the iTechForums.
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
To register now click here.
Latest Threads
Advertisements
Forum Statistics
Threads:
Posts: 3
Members:
Number of Users Online:
Welcome to our newest member,
Reply
 
Thread Tools Display Modes
  #1  
Old 03-02-2010, 10:04 PM
Son of Wonder Weirdo Son of Wonder Weirdo is offline
Junior Member
 
Join Date: Mar 2010
Posts: 1
Default

How do I use grep to search files in a Unix directory by letter?


How do I use grep to search files in a Unix directory by letter?

I have to search through my Unix home directory for all files that start with the letter, 'm' but I have no idea how to do it. It's probably really obvious.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2  
Old 03-02-2010, 10:04 PM
ba' mkuru ba' mkuru is offline
Junior Member
 
Join Date: Mar 2010
Posts: 1
Default

I use find like so:

find /home/you -name m* -print

or if you are already in the home directory

find -name m* -print
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 03-02-2010, 10:04 PM
PersoninNeed PersoninNeed is offline
Junior Member
 
Join Date: Mar 2010
Posts: 1
Default

enter the terminal
then change your directory to your home directory

and punch in this command:
ls m*
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Listing files in a directory in UNIX? SteelCrumpets UNIX 0 10-14-2009 10:40 PM
In UNIX how do I search for this using grep or egrep? richards_sd UNIX 0 09-21-2009 09:50 PM
Open multiple files in directory C Unix? linkinhardyy UNIX 1 09-03-2009 04:07 PM
Is there a way in Unix to loop through all files in a directory and extract sweetie_k_08 UNIX 0 04-03-2009 06:57 AM
unix help need help with the grep or another search command? Jaskirt P UNIX 0 02-02-2009 08:21 PM

Your Ad Here

All times are GMT. The time now is 03:36 AM.