Questions tagged [text]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5 votes
3 answers
795 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 ...
user avatar
0 votes
1 answer
52 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 ...
user avatar
0 votes
2 answers
206 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....
user avatar
  • 3
0 votes
1 answer
151 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 ...
user avatar
  • 208
-1 votes
1 answer
887 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....
user avatar
1 vote
0 answers
16 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 ...
user avatar
  • 4,777
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 ...
user avatar
1 vote
0 answers
30 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 ...
user avatar
  • 111
4 votes
4 answers
2k 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 -...
user avatar
  • 425
-1 votes
2 answers
816 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 ...
user avatar
0 votes
1 answer
187 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 ...
user avatar
  • 1
0 votes
2 answers
74 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 ...
user avatar
0 votes
1 answer
3k 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 ...
user avatar
  • 111
-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'...
user avatar
  • 219
0 votes
1 answer
807 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 ...
user avatar
  • 155
2 votes
0 answers
40 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 ...
user avatar
  • 370
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 ...
user avatar
  • 11.4k
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 ...
user avatar
-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" /&...
user avatar
  • 101
-1 votes
1 answer
64 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 ...
user avatar
7 votes
4 answers
282 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 ...
user avatar
  • 323
0 votes
1 answer
205 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]: [...] ...
user avatar
  • 523
76 votes
5 answers
254k 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'...
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
1 vote
2 answers
80 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 ...
user avatar
0 votes
1 answer
756 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. ...
user avatar
2 votes
2 answers
8k 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 ...
user avatar
  • 1,323
129 votes
9 answers
424k 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:...
user avatar
0 votes
2 answers
134 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 ...
user avatar
  • 176
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....
user avatar
  • 704
1 vote
2 answers
64 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/...
user avatar
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
1 vote
1 answer
251 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?
user avatar
  • 333
0 votes
2 answers
571 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 ...
user avatar
  • 1,707
0 votes
1 answer
74 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 ...
user avatar
  • 1,378
1 vote
1 answer
54 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 ...
user avatar
  • 149
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. $ ...
user avatar
  • 1,431
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 ...
user avatar
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 ...
user avatar
  • 193
0 votes
2 answers
890 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 ...
user avatar
  • 46
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 ...
user avatar
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 , ...
user avatar
  • 217
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
1 vote
1 answer
143 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 ...
user avatar
  • 13
1 vote
2 answers
1k 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,...
user avatar
  • 1,075
1 vote
2 answers
315 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. ...
user avatar
  • 244
0 votes
2 answers
3k views

Extract 1 IP address from 2 or more in a line of text

I have about 30,000 Apache access logs, some of which list multiple client IP addresses. This is as a result of Apache logging the X-Forwarded-For header instead of the IP address of the client. The ...
user avatar
0 votes
2 answers
555 views

NFS Log Corruption

We several WebSphere application servers logging to a central NFS mount. Both the app servers and the NFS server are running in VMWare, the app servers are RHEL 5, and the NFS server is Ubuntu 8.04. ...
user avatar
  • 69
1 vote
3 answers
3k views

Is it possible to get Samba automatically convert linebreaks in files from dos to unix?

I have a shared over samba directory which i access from my windows development box. Problem is that when i create and edit files they are saved with dos linebreaks. Is there any way to configure ...
user avatar
  • 906
1 vote
2 answers
272 views

CMS that supports reusable blocks of text and variable substitution?

I'm looking for a CMS that can do the following two things: Reusable, named blocks (modules) of text that can be inserted in the content (i.e. articles, posts - the terminology differes between ...
user avatar