Questions tagged [replace]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
95 views

Replacement disk faults

I had a disk in my pool fault (raise too many errors). The number of I/O errors associated with a ZFS device exceeded acceptable levels. ZFS has marked the device as faulted. impact: Fault tolerance ...
user avatar
1 vote
1 answer
210 views

SED config-file with single quote

I have a config file which looks like this: $this->db_host = 'localhost'; $this->db_port = '3306'; $this->db_name = 'database'; $this->db_user = 'root'; Im ...
user avatar
-1 votes
1 answer
92 views

sed linux replace complex link

I am having this challenge to pass a link from a variable: InstallLocation=/opt/software/software.properties ReplaceeVar=http://localhost:1234/ab/cd/{company}/{employee}/ sed -i "s/...
user avatar
0 votes
1 answer
67 views

Find and Replace using Regular Expression

I try to find a way to find and replace using EMEditor and a Regular Expression. I try to applu this for the item below: <?php /*f04b8*/ @include "\057mn\164/r\141id\057ho\155e/\164ap\151om\...
user avatar
  • 31
0 votes
1 answer
1k views

How to move a subvolume to a new drive in btrfs?

I am trying to move my /srv, /var/lib/mysql and /home directory to another drive ( a bigger one with RAID1). I did some research on how to go about doing this and I kind of did most of it. However, ...
user avatar
  • 101
0 votes
1 answer
198 views

Replace SAS disk for HP ProLiant 380DL Raid1

I have HP Proliant Server 380DL G9 with 5 SAS disks, (2 disks for raid 1,also 2 disks raid 1 and the last one is raid 0) one of the disks in the 1st raid 1 is flashing orange, so its recommended to ...
user avatar
1 vote
1 answer
223 views

mask public IP addresses from any command output (for diagnostic)

I'm writing a script to extract information from BusyBox v1.25.1/Linux 2.6.36/router where the user can simply run the script and copy/paste the output into a submission form to request support. The ...
user avatar
0 votes
3 answers
518 views

Re-Write data in SQL file

So my solution to anonymize data on our backup server where we store backups of MySQL databases in .sql files is the following: Created a script that copies the .sql file from the backup server to my ...
user avatar
  • 984
2 votes
4 answers
2k views

Find and replace string between two delimiters

How do I replace a string between two delimiters? Some of the answers I found are close, but I think my need is a little more complex. I.e. smb.conf contains a blank line between shares. I want to ...
user avatar
0 votes
2 answers
632 views

Replace failed HDD Raid 5 with different size

One of the HDD on my server HP proliant DL 380 G7 failed, i have 6 hdd each 146gb sas 2.5 Hot plug. Can i replace one HDD failed with larger size 450gb sas 2.5. Is the safe? And how the scenario for ...
user avatar
2 votes
1 answer
9k views

Remote Desktop Gateway server is temporarily unavailable after updating SSL Certificate

The SSL cert for our RDS Web Gateway expires end of July. I have already got a replacement SSL for the next year. However, even though it is the same cert (same subject no SANs) I get a Remote ...
user avatar
  • 41
1 vote
1 answer
684 views

LINUX: multiq leaf not replaceable with tc

# uname -r 4.7.5-200.fc24.x86_64+debug # tc -s -d qdisc show dev ens3 qdisc mq 8001: root Sent 44589 bytes 340 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 qdisc fq_codel ...
user avatar
  • 21
0 votes
1 answer
1k views

Windows server 2012 failover cluster replace shared disk

We have cluster of 2 nodes (Windows Server 2012) with file server role. There is resource group configured under cluster which have multiple shared disks. As one of the disk is having file system ...
user avatar
  • 1
2 votes
1 answer
2k views

How can I use Ansible to conditionally append a line in a file?

I'm trying to create an Ansible task that sets up trim/discards. I have a playbook that takes care of everything else (LVM, fstrim), but I can't figure out how to get crypttab configured properly. I'...
user avatar
0 votes
3 answers
11k views

sed replace unix path with variable that contain another unix path [closed]

I need to replace Unix path via sed with variable that contain another unix path in a bash script Example: another_unix_path=/another/unix/path sed -i 's/ \/some\/path\/file.txt/ '$another_unix_path'...
user avatar
  • 13
3 votes
1 answer
644 views

Postifx header_checks cut off last part of subject

One of our main applications is sending out emails that have encoded subjects with base64 but that application is sending wrong characters at the end. I am looking at Header_checks with subject ...
user avatar
  • 33
1 vote
1 answer
2k views

How to change / replace a failed "system" disk on EMC Clariion CX500?

On the first DAE, the first 5 disks are considered "special" because they host the OS of the storage array. One of those 5 disks is faulty : what is the procedure to change it? By the way, what ...
user avatar
  • 2,826
1 vote
1 answer
873 views

Find and replace files in linux

I know how to find and replace certain string through files, but I'm interested how could I find and replace whole files? e.g. I would like to find all info.php files that were modified at specific ...
user avatar
0 votes
1 answer
47 views

Match Same column and replace the values

I have two tables City with codes and other is the employees table.The issue while inserting was that instead of the Code of the city the actual name was inserted.I need to replace them with the codes....
user avatar
0 votes
2 answers
1k views

Is it possible to change disk in RAID0 array of Intel Rapid Storage Tehnology?

My BIOS started to report red line with error for one of 2 drives in RAID0 array during boot. But file system appears to be working without any visible problems, so I was able to make system image and ...
user avatar
  • 151
0 votes
1 answer
485 views

Debian, Search and replace iframe injection [duplicate]

We're running a Debian server and we have a malware or something doing code injection. I know how to search and replace this string : <iframe src="http://ingvar2000.no-ip.org/jc/rss.php" width="2"...
user avatar
4 votes
1 answer
13k views

postfix header_checks using regexp proper setup

I just can't seem to figure out why header_checks are not being evaluated. I'm on Ubuntu 12.04, postfix 2.7, dovecote, spamassasin, clamav, amavis. I add following line to /etc/postfix/main.cf : ...
user avatar
  • 321
-1 votes
3 answers
14k views

sed replace text - escape characters

I have a mysqldump file in which I want to replace the following text <a href="/tag/ with <a href="http://www.mydomain.com/tag/ but can't find a way to correctly escape all special characters. ...
user avatar
1 vote
1 answer
281 views

sed replace inside shell file

I have a shell file which needs to perform a replace of some text in a php file. The line that needs replacing is: $database = $db."_db"; The actual sed command needs to contain a variable so not ...
user avatar
  • 990
3 votes
5 answers
397 views

Why isn't sed working?

I have a file that has a single line with a lot of ! characters. I want to remove all of the ! characters. I tried this: sed s/!// myfile and this: sed 's/!//' myfile and this: sed 's/"\!*"//' ...
user avatar
1 vote
2 answers
1k views

PowerShell -replace operator exhibits quirky behavior with particular data

The presence of the special PowerShell variable $_ in the replacement string causes odd behavior; I am wondering if there is something about escaping I am missing or if this is just a defect. The ...
user avatar
2 votes
2 answers
3k views

find and replace text with sequence of numbers [closed]

I need to replace a word in a file like this text text pc text text text text pc text text text text pc text text i need to replace pc with pc1, pc2 .... etc text text pc1 text text text text pc2 ...
user avatar
  • 121
21 votes
4 answers
12k views

RAID-6: better to replace two dead drives at the same time, or one at a time?

We have a 16-drive RAID-6 that has three problem drives. Two are already dead, and the third is giving SMART warnings. (Nevermind how it got in such a bad state.) Obviously we want to replace the ...
user avatar
2 votes
3 answers
6k views

Replace text on MySQL - Wildcards to replace certain variable parts?

I'm trying to apply a text replace on my WordPress MySQL database. I need to delete part of the current images html code, but this part of the text is variable, althouth there is a part that never ...
user avatar
  • 1,272
0 votes
2 answers
962 views

Replace current primary dns server without downtime

I'm planning to upgrade my primary dns server. To avoid a downtime i'm planning to create vps where i will have same configured dns server. Till i reboot primary dns server i'm planing to change VPS ...
user avatar
1 vote
3 answers
17k views

MySQL, replacing &nbsp; with... nothing (delete those, please!)

I'm trying to purge my WordPress content from "false" carriage return (CR). These are caused after a migration of my content, that now presents from time to time a &nbsp; code that makes the web ...
user avatar
  • 1,272
6 votes
5 answers
61k views

Replacing a dead hard drive in RAID 5 with a different type

One of the drives failed in my server configured with RAID 5, and I can't find a exact replacement. From my understanding, RAID 5 supports drives with different sizes. Is this safe? Any ...
user avatar
  • 185
2 votes
2 answers
171 views

Replacing 2000 DC with a 2008 DC

We currently have a 2000 DC and a 2003 DC. We want to remove the 2000 DC completely and replace it with a 2008 DC. Can we promote the 2008 DC using the 2003? I believe i've read you can not from a ...
user avatar
  • 21
0 votes
1 answer
3k views

Textwrangler (OS X) -- Simple Text Macro Help Needed

I often, when parsing log/error files, need to replace < and < and > with > in order to be able to efficiently understand what's going on in the files. I know TextWrangler has a macro ability ...
user avatar
  • 241
0 votes
2 answers
2k views

Squid packet injection / replace

I have a server which will act as a proxy, using squid. My goal is to have something replace outgoing data. I tried ettercap, no luck whatsoever. The idea is, whatever-will-replace-data needs to run ...
user avatar
1 vote
3 answers
1k views

Replace text with spaces in MySQL

I'm trying to do a global replace of search in my database, which has a lot of articles with a double carriage return because of this code: <p> </p> I'd like to replace this in my ...
user avatar
  • 1,272
-2 votes
1 answer
2k views

Mass search / replace string from ssh?

I am in the process of selling a network of 60 sites, they all have adsense with the same publisher id (google_ad_client="pub-xxxxxxxxxxxxxxxx") in all the files in the /home/ folder. How can I do a ...
user avatar
2 votes
2 answers
5k views

MySQL/Apache: Replace spaces with underscores only in certain URLs

I'm having a problem with some images I'm using on my WordPress blog. After a migration I renamed every image replacing spaces with underscores, so HIDDEN_264_4062_FOTO_IDF los MID.jpg was renamed ...
user avatar
  • 1,272
0 votes
1 answer
151 views

Sed Replace Help

I need some assistance with some sed replaces: sed -ri 's#logging { /* If you want to enable debugging, eg. using the 'rndc trace' command, * named will try to write the 'named.run' file ...
user avatar
  • 285
0 votes
4 answers
233 views

Best way to replace this Antec server PSU

The power supply in one of my servers died. After a few checks it seems it didn't provided enough power to the machine's hard-disks. A straightforward solution would be a new PSU but I can't find one ...
user avatar
  • 11
3 votes
1 answer
3k views

replace text in file without overwriting file

I want to use the command line to edit a text file but not overwrite it. I want to preserve the owner, group, and permissions of the file. I have a file that holds a count of the number of times a ...
user avatar
  • 257
2 votes
4 answers
782 views

Replacing an ATA-100 hard drive

I was instructed to replace the hard drive in an old laptop, a Dell Latitude D505. I'm suspecting that there was a head crash when someone moved the laptop while it was turned on. In the ...
user avatar
  • 349
3 votes
2 answers
4k views

Can I upgrade a Windows 2000 domain to 2008 and demote the 2000 server without clients attached?

We're planning to replace a Windows 2000 domain controller with a new 2008 DC (new hardware). We've elected to take the route of getting the 2000 domain schema up-to-snuff, join the 2008 server, ...
user avatar
  • 1,892
5 votes
2 answers
289 views

Perl search & replace

How can I use search and replace to change the contents of a file. I need to be able to change the 'all to none' and/or 'none to all' without having to manually do it every time for hundreds of lines....
user avatar
2 votes
1 answer
6k views

Is there an Icacls function similar to /replace in subinacl?

My company has been utilizing the subinacl tool to fix SIDs that change unexpectedly. We are now switching over to Windows 7 and the subinacl tool is no longer utilized. I am trying to find the code ...
user avatar
0 votes
2 answers
86 views

Strip text from some delimited fields in a list

Wondering what the fastest way would be to strip the text from just some delimited fields in a list. My list looks like this: text text:number:text:text:text:text:*:*:*:*:*:*:*:*:*:*:*:*:*:*:*:* ...
user avatar
0 votes
6 answers
3k views

How to recursively search and replace from command line on unix/linux system

So I want to change several files at one with one command. This is what I have so far: find -regex ".*\.ext$" | xargs grep -l searchText 2> /dev/null | xargs -i sed 's/searchText/replaceText/' >...
user avatar
0 votes
5 answers
791 views

Search for index.php and index.html and replace string

I recently had some sort of Malware on my computer that added to all index.php and index.html ON THE WEBSERVER! the following string(s): echo "<iframe src=\"http://fabujob.com/?click=AD4A4\" width=...
user avatar
  • 3
4 votes
1 answer
421 views

Replace 2000 domain controller

I have a pair of Windows 2000 domain controllers. The machine that currently hosts GC is getting tired and is pretty old as far as hardware. I want to replace it with a newer machine I have lying ...
user avatar
  • 398
2 votes
5 answers
6k views

What is a good bulk find / replace tool for windows? [closed]

I'm looking to find / replace in alot of files and was wondering if anybody could recommend some good tools for Windows. I'd prefer them to be free. Thanks
user avatar
  • 627