SSH Or Program How To File Replace Lots Of Files

Jan 14, 2007

I have anywhere between 80,000 - 90,000 webpages that have a single code into this. Unfortunately at the time the web developer I used didn't use PHP includes. So each .html file has the code in it.

I want a way so I can do a single command either a program or an SSH command can find the syntax in the files and replace it will code I have. Its just a single line of code that is basically for an adsense code, so the pub-blahblahblah etc..

Does anyone know of a SSH command I can use, or a program that will find and replace without manually opening up each file? 80k - 90k of opening files then find/replace will take forever!

View 11 Replies


ADVERTISEMENT

Plesk 11.x / Windows :: Playing Values INI File Located In C Program Files

Sep 24, 2014

we had a problem playing values my.ini file located in C: Program Files (x86) Parallels Plesk MySQL Data..not keeping a copy of the old configuration and that there is now not working properly. What is the configuration which is by default or tell me how I can generate it again?

View 2 Replies View Related

Plesk 11.x / Linux :: Can't Restore Backup And Replace Files

May 25, 2014

I am trying to restore a backup that Parallels Plesk made (latest version) and I used to get the option at some point to replace everything. Now, I only get the options to select what I want to restore and it fails because it says certain things, domains, content is already there.

I can't find the option anymore that allows me to say replace everything during the backup. Was that removed? If so, I'd really....really like it back.

Warning:
Failed deployment of domain localhost.localdomain
Warning:
Execution of /usr/local/psa/admin/plib/api-cli/domain.php --create localhost.localdomain -owner admin -do-not-apply-skeleton -notify false -guid 4fe5de63-3103-4fa0-a01c-04894e167107 -vendor-guid 75b2fa01-6c6e-4cb2-8f1b-9c69757fd3ec -creation-date 2014-02-13 -ip 46.165.251.98 -ignore-nonexistent-options failed with return code 1.
Stderr is
An error occurred during domain creation: There are no available resources of this type (domains) left. Requested: 1; available: 0.

View 1 Replies View Related

How To Set Up Cron Job To Replace Index File Every 3 Hours...

Apr 18, 2007

I would like to replace my index file every three hours, with a specified file on the server thats in a different folder (someone keeps putting unwanted stuff in my index file) Can someone explain to me how this is done?

View 2 Replies View Related

Is Ufs Slower Then Ext2 For Lots Of Files In A Single Directory

Aug 23, 2007

We used Red Hat with ext2 as our file system on an old server with 100k+ of image files in a single directory. This seemed to preform ok until we switched to FreeBSD using UFS. Now images load very slow. I have read that Ext2 uses and internal hash to speed lookups, while UFS does linear searches for lookups.

View 2 Replies View Related

Node Setup - Lots And Lots Of Low Spec Servers Or

Mar 29, 2008

I run a large service on 2 machines (we're talking 8x2.66Ghz processing power, 4-6GB ram, etc), however we are thinking about creating a node/clustered setup to help spread the load, bandwidth, mysql (having one server for hundreds of thousands of databases is not wise it seems :p), diskspace etc. Lots of machines just seems to be a cheaper and more powerful option.

Would you advise going with lots of lower end machines, or just a few mid-range machines.

Here is what I propose:

3 of these
Dual Xeon 3GHZ Dual-Core (4x3GHz)
3GB RAM
500GB Sata Drive
4000 GB Bandwidth
100mbit

or

4 of these
XEON X3220 QUAD CORE 2.4GHZ 1066FSB
2GB DDR2 RAM (Upgradeable)
250GB HDD
2000GB Bandwidth
100mbit

or

7 of these
Dual Xeon 3.06 Ghz
2GB DDR2 RAM
250GB SATA
2000GB BW/MONTH
100mbit

All of the above are roughly similar prices in total.

View 5 Replies View Related

How To Find (and Replace) "^@" Control Characters In Files

Apr 28, 2009

I have an odd problem... after transferring several hundred .php files to one of our servers we noticed that the browser was showing "?" output only.

When I open the file in "vi" (we're running centos 5.x), I can see this at the end of the file:

Code:
...
</HTML>
^@^@<?php //comment goes here ?>
-------------
I highlighted in red bold the problem text. If these four characters are removed from the file (edited out manually using vi) then the file displays and works correctly.

However.. there are several hundred of these files, and some have the problem and some don't.

I've tried everything I know to find which files contain the problem, but so far no luck.

ie:

grep -r "^@" .;
grep -r "^@" .;

Basically.. I need to find any instance of these characters and then remove them.

View 3 Replies View Related

Links Files In Linux (file.txt For File.php)

Jul 9, 2007

Today I found some cstomer on the servers make a link for named it file.txt and link it to other customer php file.

so that customer have the ability to show the other custoer file content when visiting the url because it is a text wile originally it is a php file.

the php file was a config file, so now he know the database password , and because he is in the same server he can use that databse.

the question , how to avoide this prolem in the future?

notes , the SuExec is rnning and the open_basedir protection is enabled, but the problem still exists.

View 12 Replies View Related

Prevent PHP Files Used For File Uploading

Jul 3, 2009

It appears that some people like to take advantage of those files for online web applications such as Wordpress which have php files with permissions set to 777. They use those as a means of creating an upload file. The upload files that they create then have access to the whole server somehow... Is there anyway of preventing this from happening?

View 8 Replies View Related

Domlog File And Rawlog Files Are Same

Jan 8, 2007

Does domlog file and raw access files are same? I mean do the contains same contents?

View 0 Replies View Related

How To Chmod The Files And Subfolder + File.php To 755

Jun 25, 2007

i download a script .. when i unzip the script .. all the folder have chmod to 700 + 600

what command could let the folders and sub folders have chmod to 755 ( as root )

i command this

chmod 755 *

but the folders inside the folder didn't chmod to 755

there is alot folders thats why its hard to do it manually :p

View 7 Replies View Related

Use .htaccess File To Allow Access To Zip Files Only From My Script

Feb 18, 2007

I have download manager script that I use for my customers to download products right after the purchase.

Script generates download link that looks like this:

http://www.yourwebsite.com/download/...582921B&p=1840 (where 2YY6582921B is receipt number that is different with each purchase).

All products are placed in one folder. This folder can not be seen in above download url, but can be accessed thru browser and files can be downloaded that way without paying for them.

Can I use .htaccess and if yes how, to protect all product files the way that they can not be accessed directly by visiting url thru browser (in case somebody will find the correct url), they should be allowed for access only for my download manager script.

View 3 Replies View Related

WHM Not Listing Account, DNS Etc, Missing Files, File System

Jul 26, 2009

I recently had an issue where my box wasnt listing accounts (on logging into WHM for the first time it would, thereafter browsing different functions in WHM it would fail to list any accounts), would not list any zone items when editing DNS zones and in general was acting very strange.

I think the tech support chap narrowed it down to zero free inodes on the filesystem (i was even getting errors when editing files with 'vi'). This was increased for the VPS and all issues seemed to be resolved...

However named and httpd were not starting after reboots. Again on looking closely named and httpd were missing from /etc/init.d (on CentOS 5.3)! This is very strange and i certainly didnt modify those nor delete such critical files.

For a second opinion, is there any cPanel script that can be ran to fix the issues, i am concerned other things have been affected but havent manifested themselves yet (other files deleted etc). Does cPanel update script create the init.d files or is this done by the CentOS operating systems itself? Are these files modified during a cPanel update script?

These init.d files for named and httpd have been readded (copied across from another box) and it seems to be ok again, but ideas on howto proceed much appreciated, as i mentioned i dont want any nasty supprises!

View 2 Replies View Related

File Size (content Length) Not Showing When Downloading Files

Jun 30, 2009

When I download a file from my server, only specific extensions are working. This is really annoying since I want to be able to see how much time left to finish a download.

For example I uploaded a video with .vob extension
file.vob --> does not show filesize when downloading

If I rename the same file to different extension:
file.avi --> works fine shows filesize when downloading
file.mp3 --> works fine shows filesize when downloading
file.rar --> works fine shows filesize when downloading
file.mp4 --> does not show filesize when downloading
file.wmv --> does not show filesize when downloading

These are direct download links, not using any download scripts or anything. Why are some extensions displaying the filesize and some not displaying them? I am using Apache 2.x server.

View 2 Replies View Related

File/Command To Change Number Of Open Files In Linux

Aug 22, 2009

I can't seem to remember, but what's that command or file used in Linux so that you can view/adjust the number of open files and others in the system?

View 3 Replies View Related

What Type Of Server And Os, Etc For Just File Serving- Small Files Like Under 10kb

Sep 26, 2008

I have a website that just serves small files, under 10kb most of them. I just need a server that lets me ftp the file to it, set up subdomains and domains for one website. Don't need to manage mysql or anything. Not even php. Just serve files.

A good fast OS? Something like lighttpd? Ioono?

I'm currently doing 600gb of bandwidth per month. I'm expecting to do about 1000gb by the end of the year. Would a small server like a pentium 4 be able to handle just serving files?

View 14 Replies View Related

Simpleish PHP/flat Files - Create File, Edit, Save

Nov 24, 2007

Display some text in a web browser from a file called text.txt

text.txt will have many lines and some of them I do not want users to be able to modify and overwrite.

config_item_1=user can edit
config_item_2=user should see but not edit (could be on any line)
config_item_3=user can edit
config_item_4=user can edit

The user has made their changes in the web browser and clicks submit. I then need this info to be saved as the text.txt file however some checking needs to be done first. Anything matching config_item_2 should be removed. This could be on any line. Anything not matching should be permitted and added.

View 1 Replies View Related

Plesk 11.x / Windows :: Prevent Removing Files On File Manager

Jun 4, 2014

How Can I prevent users removing file web.config on FileManager?

I try set attribute read-only, but not effect.

View 4 Replies View Related

Replace Disks With Little Downtime

Feb 12, 2008

I colo a 1U machine with 2-36gig drives. They're not in RAID, and I have it set to rsync backups to a remote machine on a regular schedule. I have another remote machine functioning as a secondary DNS. Neither of these 2 are on a large upstream pipe. I just bought 2-147gig drives that I'd like to replace the 36g's with. How does this sound for a scenario to accomplish this with little downtime (pre-pardon my noob'ish ways):

1. Do a complete rsync of the filesystem to my remote machine as well as sync the mysql db's (to 1 remote drive).

2. Pop that single rsync'd drive into an external enclosure.

3. Travel to datacenter, once there, plug external drive into laptop and start up a VM that boots off of that drive.

4. Sync again so external drive has the most up-to-date data.

5. Change over IP's from colo to VM on laptop.

6. Shutdown and swap out drives in colo'd box with the new ones.

7. Setup new drives as RAID 1, install OS, then rsync filesystem over from laptop to new drives in colo'd box.

8. Change back IP's.

What am I missing, or is there an easier way without a 2nd colo/dedicated server? Currently, the colo'd machine is using about 1.3Mbit/sec outbound and it's running a low load.

View 5 Replies View Related

4 Hours To Replace Hardware

Apr 16, 2009

Recently a drive in one of my main box's has failed.

Ive contacted my provider, however there SLA states - 4 Hours for hardware replacement.

It takes 4 hours to replace a harddrive? What are they, sloths?

Anyone else had similar experiences when attempting to get drives replaced?

View 14 Replies View Related

Replace Hypervm/lxadmin

Jun 21, 2009

we know hypervm/lxadmin have some exploit. My server is ruuning with lxadmin. Is there any panel to replace it? I mean we can easily to reload OS, use File Manager like hypervm...

View 4 Replies View Related

Replace Larger HD For Raid 5

Jul 21, 2009

i have a msi server with three seagate HD,

and use seagate ST336607LC to do raid5.

the raid card is adaptec 2200S,

it is installed with centos with cpanel.

today,the websites shows 500 internal error and i asked the DC reboot,

minutes later,the websites run well.

but minutes later,it down again,and i ssh to reboot,

minutes,it shows file system problem,it seems readonly?...in my memory.

and i ask the DC to reboot again,

and i still can not login,and the DC staff tell me it shows with "operation system not found"...

and i go to DC,

it shows there is no logical drives... and operation system not found.

and i try to use ctrl+a to access raid control panel,

it shows there is no raid setting....

and i try to verify the hds in raid control panel,

it shows my 3rd hd has defect and ask if want to assign new block,

at begining,i chose no,it still can not load the os.

and then i chose yes to reassign the block and passing the verify,

but it still can not load the os.

i can not get any ST336607LC now,

i want to ask can i use larger HD to replace the 3rd hd?

if yes,after replacing and booting,

should i reset the raid configuation?

View 7 Replies View Related

Inexpensive VPS To Replace Reseller Hosting

Nov 4, 2009

Currently paying 24.95/month with Hostgator on a reseller plan but am only using ~2Gb drive space and less than 2Gb or monthly transfer.

Would be nice to find a VPS that has CPanel for about the same price range.

View 13 Replies View Related

Back-up Database And Replace The Existing One

Jan 4, 2007

I have a site but it was corrupted due to server problem with host. I have a back-up of DB in phpMySQL.

I am now installing the same script in new server and the site is now running.

The problem is, I want to use my back-up database and replace the existing one. How to do this?

View 2 Replies View Related

Find & Replace Of Text For Security...

Jul 25, 2007

My old VPS was hacked and an iframe html string was added to just about all the files on the server.

I've since then identified the vulnerability and moved to a new host and want to copy the accounts over but wanted to know if there was an easy way to search all the files for this html code and delete it?

For example, search all files for <iframe etc etc> and delete it?

I know this is probably rather simple...but I have no idea how to do it.

View 2 Replies View Related

Replace Linux With Windows Server Via Vkvm

Jun 1, 2009

I'm trying to replace my Linux OS with Windows Server 2003, which I already have a license.

I'm talking about OVH Kimsufi XL.

Following support's instructions, I booted my dedicated with netboot, specific with vkvm option.

Then I specified an ftp location, (where there is my "totally working" .iso), and I started the virtual session.

After some mins, a java windows appears, and starts the vnc session.

After usual linux loading, it stops on this :

Code:
VFS: Cannot open root device "801" or unknown-block(8,1)
Please append a correct "root=" boot option; here are the available partitions:
0300 244198584 hda driver: ide-gd
0301 5245191 hda1
0302 238428687 hda2
0303 522112 hda3

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1)

And, besides I cant write a letter!

View 13 Replies View Related

Plesk 11.x / Windows :: Possible To Replace Express Edition With Web In Panel?

Feb 23, 2014

I have one customer installed with plesk 11.5 + power pack integrated with mssql 2008 express on his server.But now client want to install Mssql 2008 web edition. Is this possible to replace the express edition with web in plesk panel?

View 1 Replies View Related

Lots Of Bandwidth

May 25, 2008

My friend is setting up a media sharing site which will use a lot of bandwidth. He would like to colo two 2U servers with 10TB or so of bandwidth each. I have advised him that FDCservers unmetered is about the best price he can have. Can anyone else suggest a place offering 100mbit or 10TB of transfer for less than $1000/month per server.

View 14 Replies View Related







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