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
Shell script to search for text in a file and copy file imeadows UNIX for Dummies Questions & Answers 9 11-12-2008 09:12 PM
How to search and replace text in same file Vrgurav Shell Programming and Scripting 1 04-25-2008 06:20 AM
automating file search and replace text ommatidia Shell Programming and Scripting 3 02-28-2008 04:40 PM
How to search for text within compressed file HLee1981 UNIX for Advanced & Expert Users 8 09-06-2007 06:50 AM
Search for repeats in text file - how? aarondesk UNIX for Dummies Questions & Answers 4 04-03-2006 04:28 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-19-2006
yuimyt yuimyt is offline
Registered User
  
 

Join Date: May 2006
Posts: 3
Question Search file contain some text

I am loging as root right now.

I like to search and find the file that contain the text of "NBC 10.5" Both string and number.

I know I need to use grep, but how do I use it???

Oh, yeah if I do, grep 'NBC' *
then it gives me error
grep: can't open usage

i thought root can open any files....
  #2 (permalink)  
Old 05-19-2006
odashe odashe is offline
Registered User
  
 

Join Date: May 2005
Posts: 31
Check what is the "usage" file. What are its permissions?
  #3 (permalink)  
Old 05-19-2006
yuimyt yuimyt is offline
Registered User
  
 

Join Date: May 2006
Posts: 3
The permission is rwxrwxrwx owner is root

When I do ls command, usage is show like usage@ it looks like it is shortcut/link file and broken link maybe???
  #4 (permalink)  
Old 05-19-2006
odashe odashe is offline
Registered User
  
 

Join Date: May 2005
Posts: 31
It is a symbolic link, i.e. a file containing a name the link points to. That file might be deleted, but the link remains intact. Delete the link or move it to another directory and try again.
  #5 (permalink)  
Old 05-19-2006
yuimyt yuimyt is offline
Registered User
  
 

Join Date: May 2006
Posts: 3
My system admin says that
"Unavoidable... that dir has sym links off to other machines .."

Crap!

He said I do this
find . -exec fgrep 'NBC 10.5' '{}' ';' -print

What does it mean???
  #6 (permalink)  
Old 05-22-2006
ssikhar ssikhar is offline
Registered User
  
 

Join Date: Nov 2003
Location: Oregon
Posts: 9
It means start finding NBC 10.5 starting from the current directory and recursively looking through all files and directories and their files/directories until all files and folders are searched. Then return the results.
Sponsored Links
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 03:30 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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