OpenSUSE Network :: Add Few Lines To Php.ini File And Modify Suhosin File?

Dec 29, 2009

Is installing "php5-suhosin" from yast and restarting apache enough to make suhosin work out of the box? Or do I need to add few lines to php.ini file and modify suhosin file?

View 3 Replies


ADVERTISEMENT

General :: Replace Several Lines In A File With Other Lines In Another File?

Oct 26, 2009

I have this massive table file with some data in it and I want to replace some lines that are wrong with the correct ones that are in another table file of the same format. The wrong lines are not all together in a block but randomly distributed so I need to make a loop checking if the line is in the other file and if it is, replace it. I want to try and do it with sed or awk but I don't really know how to....

View 12 Replies View Related

General :: Script To Insert Number Of Lines In A File To The Start Of The File?

Sep 17, 2009

I'm looking for a way to insert the number of lines in a file to the start of the aformentioned file. This should be simple but as I am not used to scripts in Linux, I am finding it tough going. I can find the number of lines in a file easily enough via

filesize=$(awk 'END {print NR}' $1)

but as for inserting this into the first line, i'm failing to do so. I've tried some of the other approaches on these forums but none so far have been able to do so.

I've tried:

sed '1i$filesize' $1

but sed i requires a string, not a variable so no go I've also tried:

mv "$1" "${1}.bak" 2>/dev/null || touch "${1}.bak"
cat $filesize "${1}.bak" >"$1"

but again with no luck as cat seems to need an input stream Just to recap, i want to insert a line at the start of a given file that holds the number of lines the original file has.

ie the file:

a
b
c
d
e

should become:

5
a
b
c

[code].....

View 3 Replies View Related

Ubuntu :: Netbeans - Whenever The File Contains More Than 3000 Lines,the File Is Not Readable?

Mar 4, 2010

HI am facing the strange issue in netbeans on ubuntu 9.04. whenever the file contains more than 3000 lines the characters overlap on each other and the file is not readable, where as if the file is less than 3000 lines it works fine. what may be the reason ?

View 2 Replies View Related

General :: View A Particular Ten Lines In A Large File Where Can't Open The File In Vi

May 12, 2010

I am using RHEL 5.I have a very large test file which cannot be opened in vi.The content of the file has some 8000 lines.I need to view ten lines between 5680 to 5690.How can i view these particular lines in a large file.what is command and option i need to use.

View 1 Replies View Related

Programming :: Sed Delete Lines From File One If Regexp Are Listed In File Two?

Sep 17, 2009

I am trying to delete lines of a file if they contain text that is present on another file. For example

> cat one.txt:

a
b
c
d

[code]....

I get the following output:

> ./test.sh one.txt two.txt
a
b
d
e

[code]....

View 6 Replies View Related

Programming :: Insert Each Line Of One File To The Another File After Certain Lines?

Jul 2, 2010

i have two files with thousands of line, I am trying to combine these two files but i want to insert each line of one file to the another file after certain lines. I am using awk with the following command but it does not work.cat file1 | awk ' { print $0; if (NR%3004==0) {print "file2"}}' > outputfile

View 14 Replies View Related

General :: Removing Lines From A File That Are In Another File?

Jan 6, 2011

I have a large text file containing over 180k lines and another text file containing about 1k. I would like to remove lines in the 180k-line file that exist in the 1k-line file.

View 5 Replies View Related

Programming :: Add Lines From A File To The End Of Another File With Sed?

Aug 10, 2010

I have two files;

file1;
1/
2/
3/
4/

[code]....

I want to use sed to append the contents of file2 to file1 line-by-line, so that the end result looks like this;

1/a
2/b
3/c
4/d

how do I do this? I've tried sed '$r file2' file1, but that just appends it at the end of the file, rather than line-by-line.

View 1 Replies View Related

Programming :: Remove Lines In A Text File Based On Another Text File?

Jan 28, 2009

I have a text file called file1.txt containing many lines eg.

line1
line2
line3
line4
line5
line6

Then i have another text file called file2.txt contains

3
5
6

Is there a command to remove the lines in file1.txt based on the keywords in file2.txt? note: It should remove line3,line5,line6 based on 3,5,6

View 10 Replies View Related

General :: Modify A File That Contains \ Using Sed Or Awk ?

May 13, 2010

I need to modify a file that contains \tsus.fbfs.comappsdataStormLossProduction and replace the \tsus.fbfs.comappsdataStormLossProduction line with rm -f /mnt/nfsvol/PC/SLR/

I have tried:

But it provides an error on the second . I need to change this in place and not redirect to another file.

Is this possible? I have used sed and awk before but not extensively.

View 7 Replies View Related

Debian :: Modify The File Grub.cfg?,

Mar 24, 2011

how modify the file grub.cfg?, is for 6.0, the grub2.

View 14 Replies View Related

CentOS 5 Server :: How To Modify PAM File

Jan 15, 2010

Whenever I modify my pam file as shown below I can no longer log into my centos; I have to go into single user mode and undo the changes. What I want to do is log all failed authentication attempts but I don't want it to affect the root user account.

# vi /etc/pam.d/system-auth
auth required pam_tally.so no_magic_root
account required pam_tally.so deny=3 no_magic_root lock_time=180

View 1 Replies View Related

Programming :: Modify Lines That Are Too Long?

May 25, 2010

I have a CDL netlist with 5630 lines. 512 of the lines are over 128 characters. The tool I am using to read in the CDL returns an error for each line over 128 characters.

If the line is too long I can fix it by adding a line continuation symbol, in this case a "/", somewhere prior to the 128th character then a line feed, obviously, and a "+" to the continuation.

example (pretend its a long line);
before;
this line is too long
after;
this line /
+ is too long

Part of the problem is that I can't use a constant point prior to the 128th character because I can't break up a term.

bad;
this line i /
+ s too long

If I can replace the last space before the 128th character with " / + " on all lines that are over 128 characters then I'm golden. I'm not sure if I need to escape the + or not. If so then the substitution is " / + ". And if I use sed then I'll escape the .

View 6 Replies View Related

Fedora :: Setup The Vim And When Modify The Vimrc File?

Apr 20, 2011

I just setup the vim,and when i modify the vimrc file ,I obviously made some mistakes ,the error looks like this and this is where the problem is and why my user name is so long ,is there anyway i can make it shorter or use others

View 8 Replies View Related

General :: Modify Another File And Not Actually Hold Information?

Feb 16, 2011

Why is the info in the (BASH_Profile) file different than (echo $Path). Is the Profile file just there to modify another file and not actually hold information?

View 1 Replies View Related

Programming :: If Modify Tcp.c Stack File And How To Compile

Nov 4, 2010

i have just modify tcp.c file in/usr/src/linux/net/ ipv4 location.Now should i compile the complete kernel?if not then how to compile that net/ipv4 package or etc.

View 1 Replies View Related

Programming :: Run Script To Modify Text File?

Mar 20, 2010

I have around 600 empty text files that I need to add the name of this file as part of the data, I mean files from "file1.txt to "file599.txt, all of them empty, and I need to get the name inside the file, so, when I open the file show the name as part of the data "file1".

View 11 Replies View Related

CentOS 5 :: Modify The ISO File By Adding Few Files

Jan 14, 2010

I need to modify the ISO file by adding few files so that after all installation done I can run a sh script to do some thing on the box. How to do that?

View 4 Replies View Related

OpenSUSE Install :: Creating ISO-file From Burnt ISO-file On CD-R Gives Different File Length

Jul 25, 2010

I downloaded three iso-images, 1 dvd-image and 2 cd-images:

openSUSE-11.3-DVD-i586.iso
openSUSE-11.3-GNOME-LiveCD-i686.iso
openSUSE-11.3-KDE4-LiveCD-i686.iso

Being paranoid, I created iso-files from the burnt DVD-R and the two burnt CD-R to verify integrity.

The iso-file of the DVD-R was identical to the downloaded image. Both iso-files created from the CD-R were different in size.

The original size of openSUSE-11.3-KDE4-LiveCD-i686.iso is 719.323.136 Bytes.

I only got 718.938.112 Bytes when recreating an ISO-file from my CD-R.

The CD-R is from Sony. When the length of my ISO-file doesn't correspond to the downloaded one, the checksum file verification doesn't work.

View 3 Replies View Related

OpenSUSE Network :: Confused With File Sharing \ When Go To Dolphin/network There Is Nothing?

Jan 31, 2010

I know that this is easy, but I am confused.I have three computers all with a clean install of SUSE 11.2. Two of them use wifi with the internet and the third is wired.I would like to share files between them all of them.When I go to dolphin/network there is nothing there and I don't know how to set it up.

View 1 Replies View Related

OpenSUSE Network :: Configuring File Sharing On Network Using Suse

Jun 27, 2011

I just installed suse on this computer, and am wanting to allow other computers to store files on it as a file server. I was reading the online manual and in the personal file preferences, it shows an option to enable 'share public files over network'. The problem is I don't see that option when I open up file preferences. All I see is an option to allow sharing using bluetooth, nothing about sharing over the network. When I look in the network I can see the computer running suse, but when I try to connect to it, it says 'unable to mount drive: connection refused by server.'

View 3 Replies View Related

Ubuntu :: Find The File /etc/rsyslog.conf So Can Modify It

Jun 6, 2011

How do i find the file /etc/rsyslog.conf so i can modify it.

View 1 Replies View Related

General :: Grasp The Proper Way To Modify The Sudoers File

Jun 3, 2010

Relatively new to Linux, but I'm trying to grasp the proper way to modify the sudoers file. As an example, what would I have to modify in /etc/sudoers to allow a user (say 'user1' for the example) to be able to add/remove software through yum? I'm aware of the fact that I need to use visudo and how to use the vi editor. I've Googled this topic and while I've found a number of pages on the topic, I never see many examples.

View 5 Replies View Related

General :: How To Modify Line Of File Using Shell Script?

Apr 12, 2010

I have a file like below
n
p
1
1
50
w

I need to modify the first occurence of 1 byt some other integer.How do i do it using shell script?Can anybode help me out with that?

View 9 Replies View Related

General :: Modify .bashrc File To Change The HISTSIZE?

Apr 27, 2011

If I want to modify my .bashrc file to change the HISTSIZE would the following command be for example; HISTSIZE=200? And if I want to change the DEBUG_LEVEL to 8 would the following command be; DEBUG_LEVEL=8?

View 3 Replies View Related

General :: Modify The Only One Pattern Among Two Patterns In A Text File?

Nov 22, 2010

I want to replace a pattern with other pattern in a textfile. But there are two same patterns,but I need two change only the second occurence. EG:

Text file is

aaaa=1
bbbb=2
cccc=3
dddd=4

[code]....

Now I want to change aaaa=x into some other entry.

View 3 Replies View Related

Programming :: Parse And Modify File Without Creating A Copy?

Nov 4, 2010

I don't think this is a "perl one-liner" of find and replace. I'm trying to auto-fill some information in a listing of files. The simplest example is that in the files the following exists:

I would want the script to find this and populate it with something like -- Date : 20101004-1758

I have a few more similar fields to autofill, and I'd like to do this from within a larger perl script I'm developing to process these files. So, how I perform in-place file modification from within a perl script?

View 3 Replies View Related

Debian Multimedia :: Modify A File Called ~/.xinitrc, But It Does Not Exist?

Feb 7, 2011

I'm getting openbox up and running on squeeze. I performed a netinstall and did a simple apt-get openboxI need to modify a file called ~/.xinitrc, but it does not exist. I read that I can copy one over from /var/x11r6/lib/xinitrc, but the /x11r6/ directory doesn't exist either. I've installed xorg, but the directory still eludes me. A package search yields nothing useful. I am using the SLiM display/login manager, which I believe calls startx, which should theoretically generate the ~/.xinitrc file.

View 2 Replies View Related

General :: Modify A File Like /etc/gdm/custom.conf From The Shell Or A Script?

Jun 22, 2010

I want to modify a file like /etc/gdm/custom.conf from the shell or a script.

# GDM configuration storage
[xdmcp]
[debug]
[daemon]
AutomaticLoginEnable=true;
AutomaticLogin=username;

But the idea is that I can add a line to a section and it check if the section is defined, (add the definition if not), the property is defined, let it undefine (erase the line), (and delete the section header if there is no property defined), etc...

I didn't find anything except gconftool-2 but it do not explain how to modify other files. (there is a shema file there).

there isn't a program/script to achieve this, but can easyly be made for every config file, If someone do something like that, with a little database of which markup use each file, it could become really popular.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved