CentOS 5 :: Command To Find And Remove Specific Letters From A File?
Nov 4, 2009
I have a file with tens of thousands of lines. I need to remove specific letters eg eggs, from every line that has the letters in it. Is there a command which can help me do that easily?
View 4 Replies
ADVERTISEMENT
Oct 14, 2010
I want to be able to check the contents of a text file for a specific string and remove it from the file from the command prompt. I would basically be searching through a number of files and if a specific string is found I would like it removed automatically. pretty much a find and replace, were the replace is nothing. any one got any ideas on how you would do this. I already have the search part sorted just need to be able to remove the string I don't want from the multiple files.
View 4 Replies
View Related
May 11, 2010
I used a script that renamed my file eg 'echo webutil.olb | tr [A-Z] [a-z]' i wanted to rename it back to webutil.olb. How do i do this for many other files that i have
View 3 Replies
View Related
Mar 19, 2011
want to know if Ubuntu provides a command to search for a command having a specific word.e.g.If I know a command contains editor as a substring but don't know exactly what the command is,then is there a way to find that command or the list of commands having editor as a substring.
View 1 Replies
View Related
Oct 19, 2010
I want to delete all files within a specific folder without actually deleting the folder, what is a good bash command for this?. I found this one but encountered some errors even though I am executing it within the specific folder:
useratdebian:/home/user/folder# find . -type f -exec rm -rf {} ;
[1] 5052
useratdebian:/home/user/folder# find: missing argument to `-exec'
[1]+ Exit 1 find . -type f -exec rm -rf
The command as it appears is:
find . -type f -exec rm -rf {} ;
how to delete only the files contained within the folder called "folder" for example?
View 4 Replies
View Related
Jan 21, 2011
I'm trying to come up with ideas for a simple way to strip a specific "entry" from a text file.I know tools like sed and perl can remove specific lines from a file but I haven't been able to come up with an elegant way to do my group of lines.In my file, the first "Location" line and the "SVNPath" line should be unique every time... but are they enough to strip out the whole set of the group plus the trailing one line of white space separating each group? Add to this, my file will grow as new entries are added (always appended to the end) but new entries will have the same formatting.
View 9 Replies
View Related
Oct 21, 2009
Many folders within a subdirectory some of which have lots of data in and some of which have only one specific file called produkt.fil inside.I need a command to find and delete those folders that contain ONLY the file produkt.fil - if other files exist (doesnt matter what they are) then they should be left alone. Note: produkt.fil exists in all of the folders always.
View 5 Replies
View Related
Jun 7, 2010
tell me the command used to find a specific word in directories and sub-directories in linux?
View 4 Replies
View Related
May 3, 2010
I found such simple example of awk
Code:
awk '
BEGIN { a = "1abc 2def"
b = gensub(/(.+) (.+)/, "\2 \1", "g", a)
print b }'
However I don't understand why the regular expresion in parentheses doesn't work how I woud expect. If I delete the .+ so it does the same.
Code:
awk '
BEGIN { a = "1abc 2def"
b = gensub(/() ()/, "\2 \1", "g", a)
print b }'
I wanted to use a regular expression in parantheses like ([/+[]()]) to get the specific letters.
Code:
awk '
BEGIN { a = "1abc 2def"
b = gensub(/([/+[]()])/, "//\1", "g", a)
print b }'
But why the regexp in () isn't working
View 16 Replies
View Related
Jul 1, 2010
I have a text file (actually a log file from a sensor) that looks like this:
Date/Time: 10.07.01 11:03:59
00 Battery Voltage 13.5 Volt
01 Reference 71
02 Wind speed 6.68 m/s
03 Wind gust 9.3 m/s
[Code]....
I want to delete every block that is not complete. If any of the above lines (Date line or lines 00 to 08)is missing I want to completely remove the block.
View 1 Replies
View Related
May 14, 2011
I want to know where to find a specific file in Ubuntu. I have the file name but I don't know where to place it to bring up the file.
View 9 Replies
View Related
Aug 31, 2011
I'm using bash under Ubuntu.Currently this works well for the current directory:catdoc *.doc | grep "specificword" But I have lots of subdirectories with .doc files.How can I search for, let's say, "specificword" recursively?
View 2 Replies
View Related
Feb 1, 2010
I know that every .desktop file comes into the Applications section but how can I find the .desktop file for a specific application?
View 5 Replies
View Related
Feb 3, 2011
I have the tar file of glibc-2.12.1, but now I want to edit the SPEC file. I can't find it. For those that want a "why", I'm trying to make it smaller. So simply, where is the SPEC file for glibc? (rpmbuild cannot find it in the *.tar.gz file).
View 4 Replies
View Related
May 7, 2010
Is there any way i can find a file with specific word inside it.For example if i want to find a file which has some text written inside it.How would i form a command to search them?
View 5 Replies
View Related
Jan 18, 2010
how to remove the underlining from letters on KDE (on menus and buttons for keyboard shortcuts I think)? I am currently running Kde4.4. If this can not be done through KDE would it be possible to modify the actual font itself to remove the underlining option? I never use the keyboard to navigate and with the font I am using the underlining seems to touch the letters themselves. Also, on a side note, does anybody know what the command is to bring up the "loguout, turn off computer and restart" menu (the one that comes up when Ctrl+alt+del) are pressed?
View 1 Replies
View Related
May 2, 2011
1. Find everything that belongs to KDE in /usr/bin/
2. Show me what it is
3. (Give me an option to) delete it
A note about what did not remove mentioned;
Code:
apt-get remove kde --purge
apt-get autoremove
View 1 Replies
View Related
Oct 15, 2009
If there is a command I can use to find specific file types? Say if I want to find all the jpg's in my home folder, but they don't have the .jpg extension in the name, how would I do it? Or can I set some kind of size parameter to find them? The ones I want are all from my digicam and roughly the same size.
View 7 Replies
View Related
Aug 3, 2010
am new to linux and trying to find a file in sub directories using find command as:find .-name *.jpg -type fBut I am unable to get the result as find command is not permitted by the server administrator.Is there any way to find files without using find command.
View 14 Replies
View Related
Jun 24, 2010
3) Open a terminal emulator (xterm, konsole, whatever) and cd to the folder you downloaded the PyLotRO source code to.
Anyone know what exactly that means? I can understand all of the rest of the download instructions, but it appears cding to a folder draws me a blank. I cannot find "cd" listed as a specific command either 8(
View 2 Replies
View Related
Jan 16, 2010
Where exactly are the temporary files stored, in /tmp or /var/tmp. How can i remove temporary files through command line? What is the difference between these two directories?
View 2 Replies
View Related
Apr 21, 2011
I have a centos server x86_64 arch installed - i am getting some issues where i want to update rpms but because there is a equivliant i386 package installed i get dependency errors.Is it safe to run this command to remove all i386 packages - will my system still boot after this yum remove *.i?86
View 1 Replies
View Related
Feb 12, 2011
I am working with Linux red hat project for my school projects. I am in command prompt and I see different colored letters. I have words in green and words in blue. I think the blue words are directories and the green ones are files is this true.
View 1 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
Dec 12, 2010
Recently I faced a problem in typing in English in OpenSuse 11.3.When I try to type in English it shows me Greek letter and worse than that I think it is really Greek (not only in font) because when I enter my passwords or try to type a command in terminal I get error,I tested with UK and USA and all other English languages and I still have this problem. I even do reset in my keyboard layout setting and in KDE setting but it didn't help.
View 3 Replies
View Related
Dec 25, 2009
I need to delete all *.trc files that are older than 30 days and I am getting a "Argument list too long" error. There are other files that should not be deleted which is why I am using the "*.trc" and newer files need to be kept as well. I have seen other postings but they do not cover both of the conditions. Below are 2 of the many attempts at doing this but I cannot get this to work.
find *.trc -mtime +31 -print| xargs rm -f {}
find *.trc -mtime +31 -print -exec rm -f {} ;
View 3 Replies
View Related
Jul 13, 2011
I need to remove a large binary file(PDF file) from a large log file which is generated daily.This is seriously hogging space on our servers.I need to remove the large PDF from the logs to make the logs smaller and manageable
I need to take out the texts (or binary file) between the strings
<my:PDF> and </my:PDF>
<applicationForm> and </applicationForm>
<image> and </image>
<extractedSignature> and </extractedSignature>
I am not sure whether sed utility can do this, these are large files and need to be pruned .I am not seeking logrotation advice just a script or command that can strip these large logs of texts between the characters above . I am not sure how to do this.These files are rather large.I am not sure how to achieve this with sed , tail, head , tr or any other facility .
View 2 Replies
View Related
Jan 11, 2010
I can't find the start command for Gnome from Terminal.
I tried:
start gnome
startx
start gne
Nothin is matching. In the Documenation is no help from console.
View 7 Replies
View Related
Sep 8, 2010
I want to scan a particular directory recursively and run a particular command with each file as input. For this I am using "find /dir/path". I dont want to write any long script containing loop on the output of "find". I want a single command which will allow me to run a command on each file of the "find" command output.
View 3 Replies
View Related
Jul 24, 2010
Is there any way to specify a color of letters in the file name?For example "my filename 001.txt".Is it possible in Nautilus?
View 1 Replies
View Related