Red Hat / Fedora :: How To Locate Words In A File
Jul 6, 2010
I am using Oracle Enterprise Linux version 4 update 7.
Sometimes I have to access large files with thousands of lines in them and I would like to locate a particultar word. e.g.
vi /etc/passwd.
The contents of file passwd are displayed.I want to find a username of joe assuming the passwd file is 2000 lines long.
I would like to use a linux command that will locate joe and highlight in the passwd file as to where word joe is.
Is there a linux command that can do this?
View 5 Replies
ADVERTISEMENT
Dec 9, 2010
I have a Dell Inspiron 1420 laptop running on Windows 7, I just download the iso file for Fedora 14 desktop edition, the live media download, and burned it to a new CD-RW, I can't seem to locate the file I need to boot it.
View 11 Replies
View Related
Jun 9, 2009
I have been messing with diff and grep for 2 days now without result
I am trying to match a file consisting of words to many separate other wordfiles in a specific directory. one by one.
What i want the script to do is to report how many matching words my main file has with every file in the directory, each in turn
setup:
Each of em are plain text files with 1 word per line
Output should be something like:
SCRIPT REPORT:
View 8 Replies
View Related
Feb 1, 2011
I was trying to install vmware player 3.0 and it prompt that it require the kernel kernel-2.6.35.6-45.fc14.i686 to be compile before it start.
Quote:
Kernel headers for version 2.6.35.6-45.fc14.i686 were not found. If you
I try following but unable to find.
Code:
Nothing to do
Code:
Code:
Then I try to map to the file, but not working.
View 3 Replies
View Related
Apr 28, 2011
Is there a command that could be used to find word content in a file? I.e I want to find all files containing the word 169.254.0.0 in /etc directory.
View 4 Replies
View Related
Mar 8, 2010
I exported a spreadsheet file into cvs format.
The cvs file is formatted this way
field1,field2,field3,..etc
I want it to be in a Quote delimited format like so
"field1","field2","field3",..etc
View 2 Replies
View Related
Jan 12, 2011
I tried Suse five or six years ago and ran into an issue that was not comfortable to work with so I went back to windows. The problem was open spaces between words was not permitted with my music files. I have transferred all of my CDs and LPs to MP3 and have a tremendous number of them and the Suse of five years ago required I convert a title like Foggy Mountain Special.mp3 into something resembling Foggy_Mountain_Special.mp3
I don't care to convert literally a hundred thousand titles to fit the latter format. Does the current version of Suse allow the use of spaces between the words or is the 'no open space' convention still required?
View 9 Replies
View Related
Nov 14, 2010
i waas wondering if anyone knew of a script or program that removes duplicate words in a txt file. im making an install script and the install list has gotten a bit long so i want to ensure there are no duplicates in the file
View 2 Replies
View Related
Feb 19, 2011
i have this file, and considering it's obnoxiously huge i'd prefer not to have to do this manually. Is there some way i can manipulate sed or awk to change every other letter in all the words in a file to capital letters?
View 7 Replies
View Related
Nov 30, 2009
i want to remove words "Max" and "constrained" in a file given below:
Max 0.003745 constrained
Max 0.004549 constrained
Max 0.001689 constrained
[code]....
and further want to replace "Max" by line number so that i can plot the resulting file. i searched in forum, but couldn't do what i wanted to do. e.g. i used
1)grep command
grep -v "Max" inputfile >outputfile
deletes whole line,and hence whole text.
2) sed command
cat inputfile |sed 's/ .{1,12} //g' >outputfile
gives output
0.003745constrained
0.004549constrained
0.001689constrained
[code]....
View 4 Replies
View Related
Jul 22, 2011
I am basically trying to remove duplicate words in my <title></title> tag after I got hit by Google Panda. I have around 750 .html files and it will be difficult for to me remove one by one. I am looking for a way to remove only from within <title> </title>
Example of a duplicate title I have:
Code:
<title>Pasta, Pasta Recipe and Pasta Guide</title>
I dont want to replace those words anywhere else in the file except for within the <title>
View 14 Replies
View Related
Oct 6, 2010
I have a text file that gets produced at the end of the script being run.
For this example the text file will produce the following:
Quote:
THE COW
THE DOG
THE CAT
THE HORSE
In the script I am using either echo or printf to print on the screen each line and then it is doing a test and produces a good or bad result.
Another example:
Quote:
THE COW -- IS HOME
THE DOG -- IS HOME
Each whitespace between the -- are 5 spaces. How can I get them to be in-line and formatted when it gets to more words, when THE HORSE arrives.
Example:
Quote:
THE COW -- IS HOME
THE DOG -- IS HOME
THE CAT -- IS HOME
THE HORSE -- IS HOME <-- This has only 3 whitespaces but is still formatted.
View 8 Replies
View Related
Jan 29, 2011
i am trying to find all 3 and 4-character length words in my file (which is huge and has alot of entries in it, a big fat wordlist!).My attempt with this regular expression (which I thought should work, found something on length search here: [URL]
cat sorted_noapostrophe.txt| grep '.{3,4}'
but it returns no results? Also to find any words starting with 'f' which are between 3 and 5 characters (inclusive) long, how can this be done?
View 4 Replies
View Related
Dec 20, 2009
How can I install the dict file to look works?
I am running SUSE 11.1
Here is the error:
View 2 Replies
View Related
Oct 21, 2010
I'm trying to highlight some key words as tailing a log file using a perl script; about my case: I want to search for a keyworrs just once and highligt all occurrence of them. I want just highlit the keywords but not the whole line but the problems are that perl just catches the first keyword in a line and skip checking for other occurrence. for example if a line like "Error: some exception happen, Unable to process" it just highlight the error and do not process the remain part of the line where it should hilight the word "exception" and "Unable"
2-How can I do some action if for exapmle at least 4 time "unable" message appear ( not just in one line but diffrent line)in below is how I use perl search and replace : Code: s/(?:(unable|exception|warning))/e[1;31$&.......
View 2 Replies
View Related
Jun 2, 2011
I am trying to use grep to only tell me files that include both words matching in a pattern file. However when i specify:
grep -f <pattern file> <file>
It pulls out anything that matches one or the other.
Not both.
how to get it to match AND not OR.
View 9 Replies
View Related
Oct 4, 2010
Its my first post in here so please be patient I am trying to use regex in perl script to detect allowed words from the file and then print output to the screen.
As an example : I have text file with orders and returns :
Item2-SKU-2-11.08.2010-online
Item3-SKU-3-11.09.2010-return
Item4-SKU-4-11.09.2010-store
My question: is it possible to make sure that i am ony outputing to the screen orders based on few conditions like Item,order form e.g. online.And is it possible to have multiple matches (Item2 only diplay if ordered online etc)
View 1 Replies
View Related
Aug 24, 2010
Software error:
Can't locate Class/Template.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8
[code]....
View 3 Replies
View Related
Jun 1, 2010
When i boot the fedora image from a dvd i'm not being taken to the fedora live system screen, instead i see a bunch a words on a black screen (looks like DOS)...am i having compatibility issues or what? ive tried 32bit, 64bit versions as well as different desktops. does anyone have any ideas? my laptop is brand new: toshiba e205 running windows 7 ultimate..
View 2 Replies
View Related
Jan 1, 2010
I am trying to get the ti_usb_3410_5052.ko driver installed but it gives a an error saying that "cannot locate the usb-serial.h file." Kindly let me know how to over come this problem. I saw in this forum about a patch but it is not working.
View 2 Replies
View Related
Jul 16, 2011
A long time ago I wrote a short essay about the 'federal' 'reserve' board. I don't remember it's name or format. I think it's somewhere on my rather large hard discs (to of them divided into various partitions).I'm trying to write a command line that will find it based on a quote that is in it: "our fathers brought forth"I have tried various configurations of grep, and or combining grep with find, but I'm getting nowhere. I really don't understand the syntax of either command, or how they work together, and the examples that I can find are really no help at all.
View 6 Replies
View Related
Aug 6, 2010
I try and burn a video DVD and I get the following message. p, li { white-space:pre-wrap; } brasero wants to install a file The following file is required:
/usr/lib/gstreamer-0.10/libgstmplex.so
I click yes and it begins to search and I get the following error message. p, li { white-space: pre-wrap; } The file could not be found in any packages. It will also give me this error message after I click OK All required applications and libraries are not installed. install the following manually and try again: mplex (GStreamer plugin) dvdauthor (application). I was able to locate and install dvdauthor via synaptic package manager but I was unable to find mplex there.
View 1 Replies
View Related
Jan 14, 2011
I am reading a book on OpenSSH and I need some help on sshd2_config . I cannot locate this file. The author claims that it should be in /etc/ssh2/. I don't see the ssh2 directory either. Is this another component that is not installed? Since the book is an implementation book, it doesn't give all the details as to what it is. It assumes you know.
View 2 Replies
View Related
Jan 30, 2011
I have the ndiswrapper util installed on my computer, however, I have been unable to install the corresponding driver from the provided cd. I have a WNA 1100 wireless adapter. I have not been able to locate a mountable .inf file on the cd. Only a "setupt.exe" or a trans.tbl file.
View 2 Replies
View Related
Jul 7, 2010
I used locate cmd to search file abc.txt (for example) as I didn't know in which directory it would be present and couldn't find it. But when I did find . -name abc.txt, it traced the file, luckily the file was in the same directory. I am wondering how find was able to search abc.txt and locate not. How these two are behavinb differently? Usually I use locate when I don't know the path to the parent dir.
View 8 Replies
View Related
Sep 7, 2010
I was just able to buy a new laptop and everything is going ok except there is no sound coming from the speakers only the headphones (hda ATI SBx00 Azalia Intel HDA) and I found this useful post ([ubuntu] No sound with hp 6735s, ATI SBx00 Azalia (Intel HDA) - Ubuntu Forums) except there is no modprobe.conf file in my modprobe.d directory.
View 3 Replies
View Related
May 17, 2011
What is the best way to locate a file or folder in your hard drive? I have been trying to do that through searching in "Files & Folders" but it seems that the search is not thorough: it doesn't look for everything. I have an external drive that when it's connected to the computer I would like to search inside of it as well. The "Files & Folders" option does not seem to do that at all.
View 6 Replies
View Related
May 23, 2009
I'm getting this when I try to do an upgrade in Adept in Kubuntu:APT Error. Context:Package download failed,I wasn't able to locate file for the libvolume-id0 package. This might mean you need to manually fix this package.
When I try apt-check in the console, I get this: The package libvolume-id0 needs to be reinstalled, but I can't find an archive for it. How do I manually fix this package?
View 2 Replies
View Related
Jun 14, 2010
I'm new to bash scripting and I've searched around the forums and Internet for this but haven't had any luck. I've found similar things but not what I need. What I need to do is write a simple script that uses what the user inputs to locate and display where a file is. I would prefer to use locate instead of find since I know that the person I am writing this for has locate on her machine (my mom, who is just beginning with Linux).I'm writing the script to make things easier for her while she learns In this particular part of the script I would like to be able to have the script prompt to enter the file she is searching for, read the her input and then display for her where the file is. I realize it would in most cases be much simpler just to teach her how to use locate, but she is very impatient and this is just a part of the script I will be writing, but I can't figure out how to do this.
View 6 Replies
View Related
Apr 10, 2009
I seem to have removed / moved / deleted my /etc/apt/source.list file and was wondering where or how can I locate them again on the web? Is there a place online that has the default repository listings for 'Etch' & 'Lenny'? I did not lose them on both but this is something I would like to know in case it ever happens to me. Seems like this would be something easily available on the web but I can't find it on Debian's site and or via Google.
View 7 Replies
View Related