The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
32 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
1answer
458 views

Nginx serves php files as plain text (Mod_Rewrite)

Grr.. Okay, I have this problem... So 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: ...
0
votes
0answers
176 views

Wireshark: fully customized output from TShark?

I'm using TShark to analyze some packet capture logs and would like to produce some nice lists from the logs. I want the lists to be in text format, so they could be viewed/printed/etc. easily on ...
-1
votes
1answer
449 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 ...
0
votes
1answer
254 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 ...
3
votes
1answer
2k views

stop Centos 6.3 loading 'Text Mode Setup Utility' at restart

I've just puppetted a virtual machine and from scratch (based on Centos 6.3 minimal). That install process does a variety of things, but one annoying side effect is that when the VM reboots, it ...
0
votes
0answers
278 views

FTP performance 15x slower for tar files of binary vs. text?

We're running some 1GB FTP file transfer tests in advance of a larger 40GB transfer and seeing 15x slower performance (450kB/s vs. 7Mb/s) when the 1GB test tar file is composed of small (<100k) ...
2
votes
0answers
33 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
1answer
220 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 ...
2
votes
1answer
415 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
1answer
312 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
1answer
56 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
4answers
241 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
1answer
119 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]: [...] ...
36
votes
4answers
48k 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 ...
2
votes
2answers
456 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
2answers
57 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
1answer
587 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. ...
0
votes
2answers
756 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
4answers
785 views

How to remove empty/blank lines in a file in Unix?

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> ...
0
votes
2answers
102 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 ...
2
votes
3answers
1k 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 ...
1
vote
2answers
44 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. ...
0
votes
1answer
2k 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
1answer
212 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
2answers
212 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
1answer
55 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
1answer
36 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
1answer
145 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. $ ...
3
votes
1answer
4k 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
1answer
321 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
2answers
573 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
2answers
757 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
1answer
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 , ...
1
vote
1answer
1k 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
1answer
101 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 ...
0
votes
2answers
843 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 ...
1
vote
2answers
217 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. ...
0
votes
2answers
2k 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 ...
1
vote
2answers
452 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. ...
1
vote
3answers
1k 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 ...
1
vote
2answers
231 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 ...
0
votes
2answers
68 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:*:*:*:*:*:*:*:*:*:*:*:*:*:*:*:* ...
1
vote
2answers
410 views

How can I replace all instances of a specified string in a text file with another string?

I have a file a.txt. I would like to replace all instances of "1.6" with "1.5" in that file, overwriting the original file.
2
votes
3answers
449 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 ...
1
vote
1answer
3k 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 ...
5
votes
6answers
50k 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 ...
5
votes
8answers
2k views

How to remote control Windows?

Is there a way to remote control a Windows machine as easy as I do with my other Linux pcs through SSH? I'm currently using a FTP server for files but I prefer the way I can manage my other linux ...