Questions tagged [text]
The text tag has no usage guidance.
60
questions
1
vote
0
answers
39
views
Sort two config files in the same order
I have two servers running the same set of internally developed apps. One is the "production" server, the other is the "dev/test" server. As time has gone on, the config files ...
0
votes
1
answer
91
views
sed not working on large files. Any other options available?
Trying to insert a line feed on large files in UNIX when a text string matches. Any file around 1GB or less, it works. Anything over that size, it does not complete the replace. It appears to do ...
0
votes
1
answer
37
views
How to show a password-containing automated generated image, whose "content" is "copyable"? [closed]
I'm responsible for a MediaWiki in my company. That Mediawiki contains information, like passwords. Currently those passwords are stored on the server, hosting the MediaWiki, but when a person surfs ...
0
votes
1
answer
95
views
Odd behavior of bash array
I've recently encountered a strange script behavior and still don't understand y the array behaves this way.
Here is a piece of the script:
for nCDATAReg in $(seq 1 4)
do
sTestBuffer1=$(...
5
votes
3
answers
830
views
Best way to remove text from the beginning of a huge file
I have a huge MySQL backup file (from mysqldump) with the tables in alphabetical order. My restore failed and I want to pick up where I left off with the next table in the backup file. (I have ...
0
votes
1
answer
129
views
Outlook: Invalid signature of mixed HTML/Plaintext E-Mails
while testing new security GPOs, i've found the problem that with E-Mails that contain HTML and Plaintext, Outlook always complains about invalid signatures or tempered messages, even though with the ...
0
votes
2
answers
541
views
Piping nc to sed and evaluate datetime for each row
Could someone provide any idea, how could i pipe data from nc to sed (or awk, or anything) and evaluate and write to file a timestamp after each row?
What i have:
# cat /etc/systemd/system/ncserver....
1
vote
1
answer
2k
views
Display first few characters of first few lines of a text file
On Linux in a bash shell, I have a text file with long lines and would like to look at the first few characters of the the first few lines. Thus, I need something like head, but with the ability to ...
0
votes
1
answer
1k
views
How to remove text after a 4 digit year in a file name
I am looking to remove all text after the 4 digit year of movie files:
Input:
Some.Movie.Name.2011.1080p.BluRay.x265.mp4
Another.Movie.Name.1999.1080p.BluRay.x264.mp4
Another.Movie.Name.II.2001.1080p....
1
vote
0
answers
44
views
Is there a text-based Windows Firewall Configuration?
In Linux, you can use iptables to store/load your iptables based firewall configuration, but in Windows it appears to me that it's all GUI based, which means you can't store / track the changes you've ...
0
votes
1
answer
1k
views
Risks to increasing the IIS 7 --"Maximum Requesting Entity Body Limit"
IIS 7 -- "Maximum Requesting Entity Body Limit"
It is certainly easy enough to increase the field "Maximum Requesting Entity Body Limit" in IIS 7.
Has anyone encountered risks to increasing this ...
1
vote
0
answers
32
views
Globus GridFtp truncates end lines in text files
I am using this configurations for the server side:
Globus gridFTP server 10.6 (1467236171-85)
Fedora 22, 64-bit GNOME Version 3.16.2
As for the client side I am using different clients:
libcurl ...
4
votes
4
answers
3k
views
How to decipher Powershell syntax for text formatting?
I found a PowerShell script that I thought I could adapt to my purposes.
It contains this line that formats the output:
$largeSizefiles = get-ChildItem -path $filesLocation -include $Extension -...
-1
votes
2
answers
915
views
Prevent using cleartext passwords in e-mail protocols? [closed]
Checking an older laptop in my possession, I found that all of the POP accounts set up on that device, were sending passwords in clear text when Sending and Receiving (Found this with the assistance ...
0
votes
1
answer
199
views
save output of a python script to a text file
how can i save output of this python script to a text file? this is a KMS server which clients connect to it and activates their windows or office. i wanted to save the log in a text file. I should ...
0
votes
2
answers
82
views
Print text file with folder file names [closed]
So i have been tasked with getting folder and file names for a portable hard drive. Currently I'm not sure how to go about doing this I know the standard command prompt way to go about it, but let's ...
0
votes
1
answer
4k
views
Nginx serves php files as plain text (Mod_Rewrite)
There is no .htaccess (Mod_Rewrite) in Nginx.. So I've converted my .htaccess to a format which can be read and placed in the default.conf.
Original htaccess:
Options -Indexes
RewriteEngine on
...
-1
votes
1
answer
1k
views
Corrupted text file recovery (Win7 x64) [closed]
I'm having some difficulties in recovering the contents of a .txt file. While writing to a text file, on a Win7 x64 virtual machine, the host machine crashed. After rebooting, I noticed that the file'...
0
votes
1
answer
881
views
Remove text between delimiters in linux [duplicate]
Server got hacked and a fair amount of files were edited. We noticed that the code that was inserted were typically done between delimiters (e.g. /*e21234*/ blah blah /*/e21234*/). What is the most ...
2
votes
0
answers
41
views
server for replacing text [closed]
I have a large key-value database of words. Each entry is a word that replaces another word. I am given a continuous stream of text where I have to replace the words with corresponding words in the ...
2
votes
1
answer
2k
views
How can I remove old log entries from a log file and archive them somewhere else in Linux?
CentOS 4.x
I apologize in advance if this is not the appropriate place to ask this question. It pertains to a linux server / IT admin task.
I've got a log file on an old CentOS 4.x server and I ...
3
votes
1
answer
2k
views
Removing control characters from a text file
I started a unix keystroke log with script temp.txt; however, it captures my keystrokes verbatim (backspaces, arrows, etc...). What is the best way to remove the control characters from a file named ...
-1
votes
1
answer
3k
views
Concatenate first line to the end of second line in a text file [closed]
I am trying to append first line to the end of second line. I have huge text file where I have to this process for all the entries.
Value="AF" />
<ListItem Text="Afghanistan"
Value="AL" /&...
-1
votes
1
answer
70
views
Substiting a line through PHP in SSH [closed]
I've already setup SSH usage in PHP and most of the things work.
Now what I want to do is that I'm looking to edit a line in a file and replace it back. It works directly on the server but can't seem ...
7
votes
4
answers
287
views
get text between keywords in log file
If I have a log file and want to dump only the text between 1234 and 9876 in to another file, how can i do this easily?
If I have a text file like this:
idsfsvcvs sdf sdf e e sd vs d s g sg s vc ...
0
votes
1
answer
297
views
Calculate rate from log file timestamps
From postfix's logfile I can grep all the lines that indicate the delivery of one message:
Jan 3 15:28:21 mail postfix/pipe[1040]: [...] status=sent
Jan 3 15:28:21 mail postfix/pipe[1157]: [...] ...
76
votes
5
answers
295k
views
How do I grep through binary files that look like text?
I have binary files that should be text (they're exported logs), but I can't open it with less (it looks ugly - it looks like a binary file). I found that I could open it with vi and I can cat it (you'...
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 ...
1
vote
2
answers
83
views
Ubuntu server Logs to email want to keep formatting in email.. ( new lines where required, etc )
want to send log files from Ubuntu Server via email using sendemail but the when I do all the text in the email is all in one big mess ( one space between words new lines and spacing not brought into ...
0
votes
1
answer
759
views
Save the body of an Exchange 2010 message to a file
We are completing our upgrade from Exchange 2003 to Exchange 2010. We created an event sink to write the body of email messages with specific Subject lines to a text file for automated processing. ...
2
votes
2
answers
9k
views
Creating a text file with no newline at the end of it
I am using ldapsearch with its -y option where the password for the ldap server is read in from a file in order to ensure that the password is not left in the command history.
ldapsearch requires ...
154
votes
9
answers
516k
views
How to remove empty/blank lines from a file in Unix (including spaces)?
How do I remove empty/blank (including spaces only) lines in a file in Unix/Linux using the command line?
contents of file.txt
Line:Text
1:<blank>
2:AAA
3:<blank>
4:BBB
5:<blank>
6:...
0
votes
2
answers
162
views
ip based filtering and ban
How can I ban IP addresses from accessing the my website. Also, would it better to store ip addresses in a text file, php file or a database.
I want a black list.
I am using Apache.
Also, I want ...
5
votes
3
answers
5k
views
"group by count" for IPs in text file in linux
I've got a huge textfile which contains IP addresses:
123.33.22.33
221.23.128.2
123.33.22.33
92.222.192.12
92.222.192.12
123.33.22.33
I can sort it to:
123.33.22.33
123.33.22.33
123.33.22.33
221.23....
1
vote
2
answers
69
views
What is a descriptive name for a web service that responds with plain text?
I'm looking for the proper name for a web service that responds with text as opposed to XML. As an example this "cardServer" service will return 5 cards for a poker hand.
http://hostname:8080/...
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 ...
1
vote
1
answer
276
views
Apache Send .java files as text instead of download
How do I configure my apache instance to simply load *.java files in browser instead of sending it to me as a download?
0
votes
2
answers
639
views
Getting \r\n newlines to display properly in Mantis database
I've exported a Mantis project from one server to another and despite the MySQL SQL file (from which it was populated) showing:
(15375,'\r\n1. Log out\r\n\r\n2. When logging in, start ...
The final ...
0
votes
1
answer
76
views
Capturing text from windows applications
I had an application a while back that would allow me to dump text from any application on screen to a text file. Unfortunately, I used it so rarely that I don't remember what the name of it was. I ...
1
vote
1
answer
56
views
An FTP client that automatically detects and converts proper newlines?
If I am mistaken if this is already the case I apologize. I do most of my work on a Linux system and use Filezilla to often upload my work, unfortunately I sometimes open a few files on my Windows PC ...
0
votes
1
answer
181
views
How to display results without two first lines
When I run some bash command it returns 2 .. n lines of text (n is different each time, may contain blank lines).
How to filter the output to display the result skipping lines 1 and 2?
e.g.
$ ...
5
votes
1
answer
11k
views
How can I replace line #6 in a text file in a bash script?
I have a text file that is generated by 3rd-party software as part of a build process. I want to replace one specific line - in my case, line 6. How can I do this in my bash script?
I suspect sed is ...
1
vote
1
answer
2k
views
Delete a large chunk of lines from a huge file
I have a 2.8GB sql dump file in linux. I need to delete lines 18 through 3000, but I can't open it in a text editor like vim because it's so big.
Any suggestions? I assume you could use sed or ...
0
votes
2
answers
940
views
How to find malformed - corrupted - dos - BOMByte Files in Linux
I've several problems maintaining large production servers, in which some developers drop files from Windows environments, sometime with BOM-bytes (We use UTF8, and no need for that), causing lots of ...
1
vote
2
answers
3k
views
Adding lines to text files through Group Policy
I need to add two lines to text files using group policy. I cannot replace the files with the updated one since the content of the files differs from one machine to another, but all of them have to be ...
0
votes
1
answer
1k
views
Can Jdownloader be installed into text mode in linux without X11?
I'm insterested into installing Jdownloader into text mode in linux, i want to use the api it has to control the downloads from a web application
Do you guys think that's possible in gentoo? if so , ...
3
votes
1
answer
4k
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 ...
1
vote
1
answer
144
views
a command to get the lines around a specific line of a text file
I'm looking for a command to get text around a specific line of a file.
ex:
file content:
a
b
c
d
e
f
g
h
i
j
a command like:
]$ commandname -text f -lines 3
giving the output
c
d
e
f
...
1
vote
2
answers
2k
views
perl mass text replace with literal dollar sign
trying to replace text patterns with dollar signs and ()s, can't get it to work. please help
find /var/www/vhosts/prod/xxx/ -name "*.php"|xargs perl -w -i -p -e "s/mysql_fetch_array\($res,...
1
vote
2
answers
324
views
Unicode versions of common UNIX text tools to run on Windows
I can't afford the MKS toolkit (also think its a bit overkill for my needs). So I was wondering is anyone knew of the standard set of unix text tools but that can handle unicode files under Windows.
...