The UNIX and Linux Forums  

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
Find files and display only directory list containing those files r7p UNIX for Dummies Questions & Answers 4 06-05-2009 09:46 AM
I need a script to find socials in files and output a list of those files NewSolarisAdmin Shell Programming and Scripting 1 02-19-2009 01:01 PM
ls > file - Creating file containing the list of all files present in a directory pranavagarwal Shell Programming and Scripting 1 09-26-2008 09:37 PM
How to find the list of files senthilk615 Shell Programming and Scripting 2 06-19-2007 02:43 AM
list read only files using find vivekshankar UNIX for Dummies Questions & Answers 1 05-26-2005 05:47 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-18-2009
008_ 008_ is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 2
Creating a List of Files With Find

Hi,

I need to go through all the files on my system and build a list/output file with the paths of all files where the first two characters within the file match an expression.

I know I can use something like

Code:
find . | xargs cut -b1-2

or

Code:
find . -exec cut -b1-2 {} \;

to get the characters I need and then use grep to match it, but then I don't have the file path that I need.

I may be going about this the totally wrong way, so any suggestions would be very appreciated.

Thanks.
 

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 08:40 AM.


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