Questions tagged [text]
The text tag has no usage guidance.
60
questions
1
vote
0
answers
58
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
331
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
38
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
131
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
844
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
148
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
675
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
48
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 ...
163
votes
9
answers
547k
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:...
2
votes
3
answers
1k
views
Tool for multiple pattern search and replace
I am looking for an easy to use tool that will allow me to have batch of search/replace pairs. Rolling out to different environments requires us to search/replace server names in database scripts. I ...
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 ...
76
votes
5
answers
311k
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'...
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 ...
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
vote
2
answers
9k
views
DHCP lease information to file
Is there a command where I can convert the mac address column of the DHCP lease to txt file or CSV?
I am setting up mac filtering on a wireless controller but just want to use copy and paste instead ...
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
929
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
209
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
92
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
2
answers
644
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 ...
9
votes
6
answers
89k
views
How can I export all group policies to a easily-parseable format?
I need to dump all the Group Policies within Active Directory to review offline at a later date. Is there a way I can easily export all the Group Policies to text or some other easily-parseable format?...
-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
884
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
42
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
3k
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
73
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
288
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
315
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]: [...] ...
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
86
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
760
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 ...
0
votes
2
answers
171
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
71
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
278
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
945
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 ...
0
votes
1
answer
79
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
62
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 ...
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 ...
0
votes
1
answer
182
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
12k
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 ...
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 , ...