General :: Unconvert Text File From Binary Format

Dec 28, 2010

I've got a rather large CSV file (~700MB) which I know to consist of lines of 27-character alpha-numeric hashes; no commas or anything fancy. Somehow, during its migration from Windows to Linux (via winSCP and then a few regular SCPs), it has converted into some kind of binary format I am unfamiliar with.If I open the file in vi, everything appears fine, and it says [converted] at the bottom, although I know it's not a line endings issue (and dos2unix doesn't help). If I 'head' the file, it looks proper except for a " at the beginning of the first line. If I open up the file in nano, however, I see the at the start and then "^@" before every character (even newlines and EoF).

If I try to re-save or copy the file (say via: head file.csv > short.txt), this special encoding is preserved. I copied the first ten lines out of vi (which displays it properly) into my Windows clipboard via my SSH client, then pasted it into a new text file, test.txt. This file is visually identical when opened in vi (and similar through 'head', minus the ), although it's roughly half of the filesize. I have no idea what format this once-text file got converted to (it's notoriously hard to search the internet for symbols), but surely there must be some way to convert it back.

View 1 Replies


ADVERTISEMENT

Programming :: How To Save Text Data In Binary Format Using C

Feb 20, 2010

I have created a file using open() and written data to it. Data appears as normal characters in the file. How to save these characters in a binary format in that file using C language? Here I mean that the characters should be actually stored as 0 and 1. Do I have to convert the whole data using some function or there is some standard way to do it in Linux?

View 14 Replies View Related

General :: How To Verify If The File Is Binary Or Text Without To Open The File

Sep 7, 2010

how to verify if the file is binary or text without to open the file

View 2 Replies View Related

General :: Convert Pdf File To Text Format In 4.7?

Dec 27, 2010

I have an pdf file on my linux RHEL 4.7 machine. I can open that file but when i click on 'saveas' to save the file in 'Text' format there are no options i see there. I need to save the 'pdf' file to 'text' format. could anyone tell me how to save the pdf file to Text format. Iam using 'KDE'

View 6 Replies View Related

General :: Cannot Run CGI On Apache - Get The File In It's Plain Text Format

Jan 31, 2011

I'm trying to run a CGI file with Apache2, but when I navigate to it, I just get the file in it's plain text format and not actually parsing the file. What do I need to configure?

I've tried this Code: <Directory /var/www/>
AddHandler cgi-script *.cgi
Options +ExecCGI
</Directory> And I've tried this Code: <Directory /var/www/>
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
[Code]...

View 1 Replies View Related

General :: Output A Text File In Proper Format?

Mar 4, 2010

it compares two files using md5... if they are same , a corresponding character is output to a text file .. but the problem is it gets appended by default.. is there any way to output in a normal way because the text is a message and it should be of proper format
here is my script

Code:

#!/bin/bash
g=`tail -1 new.txt|head -n 1`
array=( a b c d e f g h i j k l m n o p q r s t u v w x y z )
for((i=1 ; i <$g+1 ; i++))

[code]....

the message is supposed to be hello , i need to get rid of the endlines somehow..

View 2 Replies View Related

Server :: Scp Truncate Text File Busy - Copying File Is Not A Running Binary?

Jun 14, 2010

I am having problems with scp during a backup operationI added a ps -ef before and after the scp operation used during the backup.The backup is a script to backup a Zimbra ServerI am including the code segment that I am having problems

Code:
# DRCP Section. To scp newly created archives to a remote system
if [ "$DRCP" = "yes" ]

[code]...

View 3 Replies View Related

Software :: Create Binary File With Text In It?

Nov 17, 2010

How to create binary file with text in it, something like

Quote:

Hola Mundo!

I want it binary, because I want to execute it directly from Bios before Windows.

View 7 Replies View Related

General :: Convert Binary Number To Text/ascii?

Mar 16, 2011

is there command in linux which is able to convert binary (0101001010000100) to text like it means something

View 4 Replies View Related

Programming :: String Format - Create A Text File ?

Feb 3, 2010

I am using C. I have a fuction that returns a string

Code:

I need to format this string so that I can create a text file like so:

So I'm trying:

Code:

But I get errors like:

View 2 Replies View Related

Programming :: Finding A Utility To Combine Two Or More Binary Files Into A Single Binary File?

May 5, 2011

Is there any Linux utility to combine two or more binary files into a single binary file ?

View 7 Replies View Related

Software :: Finding A Php Script To Format And Display A Select Amount Of Text From A File?

Jan 23, 2009

i need a php script to format and display a select amount of text from a file or a cron job that'll do it (with grep etc) and out put to a file but whatever is easier i want to display all the banned ip's i have in my .htaccess file i have a lot of lines in my .htaccess file but i have a line that read like this:

Code:

RewriteCond %{REMOTE_ADDR} (123.123.123.123|123.123.123.123|123.123.123.123)$

the 3 test ip's are 123.123.123.123 and i want the "" stripping and the "|" removing and each ip to be on it's own line like this:

123.123.123.123
123.123.123.123
123.123.123.123

i'm not bothered if this is a php script that'll read the .htaccess file and display the output or a cron job that'll run every x mins and output it to a .txt file but i'd prefer a php script

View 14 Replies View Related

General :: Convert Binary File In To Ascii File Using Shell Script?

May 23, 2011

i am trying to convert a binary file in to ASCII using shell script. this file contains multiple types of data like string, number, bcd, etc.

View 5 Replies View Related

General :: Automatically Saving Text Files In DOS Format?

Oct 5, 2010

I usually work with plain text files, and when moving them across platforms, the differing format creates problems. I want that whenever I save a file with extension *.txt, it be saved as DOS format, and all other extensions or without get saved as Unix format.

View 2 Replies View Related

General :: Display Utf8 Format In Text Area?

Aug 10, 2009

I have a form that have a browse button, convert to ASCII button, cancel button and text area... all i have to do is...? when i click the browse button and choose a folder that have a utf8.txt the file that have utf8 will appear or display into the text area... what i can i do to make this..?

View 6 Replies View Related

General :: Parsing A Binary File?

Mar 17, 2011

Is it possible to parse through a binary file using a script using either Korn shell or Bash

View 3 Replies View Related

General :: Catalina.Out File Has Binary Data After Rotate

Feb 14, 2011

I manually rotated my catalina.out file, and now the file jumps to 30+Mb and when I try to view it, less tells me it might be a binary file. It sure appears to have binary data in it, about 30meg of it.

I did the rotate via a copy:
copy catalina.out to another file
cat /dev/null > catalina.out

I have tried using echo:
echo "" > catalina.out
...also with the same result.

This application isn't something I can just bounce when necessary. It kind of appears that the original file is still there - sort of. But is it not readable text anymore.

SunOS 5.10
tomcat 5.5.26 (version required by app vendor)

View 2 Replies View Related

General :: Replace Text In One File With Text From Another File Using Sed?

Apr 28, 2010

How could I replace text in one file with text from another file using sed?

The text in each of the files would be surrounded by a starting and ending delimiter or a starting tag, say like /* */ so to easily find them.

View 8 Replies View Related

Software :: Customizing Knoppix LiveCD (Run Binary Text On Bootup)

Mar 23, 2009

I'm trying to customize Knoppix to automatically run a text only binary upon bootup. Does anyone know how I might do that? I suppose I need to copy the binary into the file system and change the boot loader to point to the binary and perhaps some other stuff.

View 1 Replies View Related

General :: -bash: /usr/sbin/amrecover: Cannot Execute Binary File

Jun 8, 2010

I just installed amanda-backup_client-2.6.0p2-1.rhel4.i386.rpm on my Red Hat Enterprise Linux 4 system. But I don't know who to check if it successfully installed or not. When I try to run amrecover from root, I get:

-bash: /usr/sbin/amrecover: cannot execute binary file

View 4 Replies View Related

General :: Creating Bash File That Changes Decimal To Binary Using Obase?

Apr 21, 2011

Code:
#!/bin/bash
echo 'obase=2;10'|bc

[code]...

View 2 Replies View Related

General :: Command Line To Prepend 8 Bytes Of Data To A Binary File?

Jan 14, 2011

i would like to add 8 bytes of data to the begigning of a binary file.is there a command for this?

View 2 Replies View Related

General :: Can't Remove An Audio File With Symbolic Link To Its Binary Itself / Enable It?

Nov 2, 2010

It appears that a write protected socket was established as a symbolic link between an audio file and the binary of the audio itself.
We are unable to remove the files and the holding folder. Attempted all possible combination of RM that I could think of and then graduated to shred. We are unable to do so code...

View 3 Replies View Related

Ubuntu :: Sort The Output To A Text File So That It Prints To The Text File At 1 Process Per Line?

Feb 6, 2011

im trying to output a list of running processes via a shell script. At the moment i got this which outputs the processes to a text file called out.

echo $(ps aux) >>out

The problem is though, the processes are all just one big block of text which makes it hard to read. Does anyone know how to sort the output to a text file so that it prints to the text file at 1 process per line? I know its probably simple but im very new to linux.

View 5 Replies View Related

General :: Jre - RHEL-5 / Getting Error Jre-6u16-x64-rpm.bin: Line 368: ./install.sfx.20520: Cannot Execute Binary File"?

Oct 22, 2009

I have installed RHEL-5 on a 64-bit machine recently, and want to install java. Earlier when I did "java -version", it showed jre1.4.0. But for my application , I need jre 1.5.0 or later, so I decided to download jre1.6. I am the root user here and I downloaded the jre1.6 as rpm.bin as well as simple .bin format.

But the problem is that when I tried executing any of them, I am getting below error message :

" ./jre-6u16-linux-x64-rpm.bin: line 368: ./install.sfx.20520: cannot execute binary file"
Moreover, now when I tried "java -version", it is not showing any thing.

Could anybody suggest me how can I resolve this deadlock situation, as I need to install my other application at the earliest.

View 9 Replies View Related

Programming :: Remove Lines In A Text File Based On Another Text File?

Jan 28, 2009

I have a text file called file1.txt containing many lines eg.

line1
line2
line3
line4
line5
line6

Then i have another text file called file2.txt contains

3
5
6

Is there a command to remove the lines in file1.txt based on the keywords in file2.txt? note: It should remove line3,line5,line6 based on 3,5,6

View 10 Replies View Related

Fedora :: Create A Pdf File In A3 Format From Two Sheets In A4 Format?

Apr 7, 2010

my school we want to print a magazine but we have problem with the format of the files. We need to create a sheet in A3 format from two sheets in A4 format. I was reading about the pdftk library but it doesn't do what i need.

View 4 Replies View Related

General :: Convert An HTML Email Saved As A Text File To A PDF File From The Command Line?

Aug 23, 2011

I need to be able to convert HTML email messages saved as text files (.eml or .msg) to PDF documents, one PDF per email, retaining formatting and images.

Are there any Linux tools that will allow me to do this from the command line (so it can be scripted)?

View 1 Replies View Related

Ubuntu :: GDM Broken - Gdm-binary[230]: WARNING: Unable To Load File '/etc/gdm/custom.conf'. No Such File Or Directory

Sep 1, 2011

I've had Ubuntu 11.04 installed on my desktop since it's release. Up until an hour ago, it was working fine. I clicked on an update from the update manager, now booting into a graphical mode is completely broken, (the start-up load hangs at 'Check Battery State ... [0k]'). I restarted my computer, and booted into safe mode, and launched the terminal. This all works fine. I then typed :

Code: sudo gdm start into the command prompt, hoping that I would be able to start things manually. Instead, it spat out this: Code:

gdm-binary[230]: WARNING: Unable to load file '/etc/gdm/custom.conf'. No such file or directory.
gdm-binary[230]: WARNING: Unable to find users : no seat-id found.
gdm-binary[230]: WARNING: Gdm Display: display lasted 0.070467 seconds

The last line was printed about 8 times, with slightly different times, before it gave up and failed. Some information which might help, I have Gnome 2, Unity and KDE (not sure which version), installed. My graphics card is the GTX 275, and I have driver the Nvidia driver 275.21. So yeah, I think the update has gone and moved custom.conf somewhere, but I have no idea on how to fix it. I have a graphics programming assignment due on Friday and I would be eternally grateful if I could get this fixed well before then.

View 2 Replies View Related

Programming :: Convert An Arbitrary Binary File Into A Executable File?

Feb 18, 2010

In a project I'm working on with a few other people, I got the task of writing an assembler. The last thing I do is convert the commands into a binary representation, and jam it into a file. Now one of my teammates said he'd like to be able to "reference" the code within another program. He said he'd be able to do this if the file I output is a Linux object file. I'm thinking it'd also work as an executable. Anyway, he said he'd like to be able to grab the file and reference the binary by address. I'm still fuzzy on this, and if you're confused with what I said here, please tell me so I can ask him for better details.Anyway, I'm aware that gcc can compile files to ".o", but that's only for C/C++, and my file is just binary. I'm also aware of "ld", but I haven't seen any use of it to help me. I'm happy to hear suggestions as to what I can do. If anything, I think I'll implement a few functions to grab the bits and hand them to him in an array or something.

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved