ASCII Vs. Binary Files

Trying to work with gnuplot in Ubuntu 12.04 I run into confusing comments about binary vs. ASCII files. Take this as an example for instance. Looking for a good explanation I open this link. It is an outstanding sample of confusion and obfuscation. My own understanding is that binary is an executable file and ASCII is a source file. With gnuplot it is all upside down. I am confused.

Thanks,- A.


Similar Content



How To Color Different Lines In Gnuplot

Hi there. My environment is Ubuntu 12.04 OS. I have an example of the files I create with gfortran and gnuplot. The gnuplot draws this picture from a data file with 2D Cartesian coordinates. It is perpective projection. I need to color some parts of the plot (various lines) in different colors because some other details must also be drawn and I feel that the resulting network will be confusing. Gnuplot user manuals treat this subject but only in conjunction with lines drawn through a formula like sin(x), etc. I don't have that. All I have is columns of floating point numbers. Is there way I can draw lines of different color with gnuplot 4.6?

Thanks, - A.

Grep Is Not Working In RHEL5.3

Hi,

I have Redhat 5.3 running on my machine. But when I am login through putty it gives me below error.
Without running any grep command I get this error on login and the grep command doesn't work.

login as: root
root@IP's password:
Last login: Mon Feb 16 15:27:55 2015 from IP
-bash: /bin/egrep: cannot execute binary file
-bash: /bin/egrep: cannot execute binary file
-bash: /bin/egrep: cannot execute binary file
-bash: /bin/grep: cannot execute binary file
-bash: /bin/grep: cannot execute binary file
[root@bkpdrill ~]# grep MemTotal /proc/meminfo
-bash: /bin/grep: cannot execute binary file

Cp $var1 Var2 Doesn't Work

I'm running a bash script on a Raspberry Pi to control LED pixels. I'm stuck on a basic copy command.

I have a variable called nexttemp which contains the string B_254_TieDyeKaleidoscope.fseq

That file, in the same directory, is a large binary file that I'm trying to copy to a file called MasterFseq.fseq

If I do a

cp nexttemp MasterFseq.fseq

then MasterFseq.fseq contains the B_254_TieDyeKaleidoscope.fseq file name.

I want instead to have copied the binary file to MasterFseq.fseq.

It's my understanding that a $nexttemp will point to the binary file and not the name of it but when I do a

cp $nexttemp MasterFseq.fseq

the $nexttemp is thrown away and I'm told there is no destination file name, eg.

root@FPP:/home/pi/media/sequences# echo cp $nexttemp MasterFseq.fseq
+ echo cp MasterFseq.fseq
cp MasterFseq.fseq

How do I get the binaray file, which is named in nexttemp, copied to MasterFseq.fseq?

John

Installing Gnuplot Version 5.0

Hi there. I have a problem installing the newest version of gnuplot which is 5.0. I downloaded it from this website (sourceforge): a source tarball. The Ubuntu 12.04 archive manager in my laptop placed it in the directory /home/alex/gnuplot-5.0.0.tar. I opened the directory/folder with a click and began reading manuals. The install procedure (read INSTALL.gnu) calls for issuing this command:

Quote:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
It is impossible to get to the directory gnuplot-5.0.0.tar via a terminal. If I type cd gnuplot-5.0.0.tar it says that this is not a derectory. If I omit .tar it does not recognize the name at all. I tried to rename it but after that I could not open it even with a click.

What shall I do?

Thanks, - A.

How To Install New Binary On An Embedded Board ?

I am currently missing some binary on the board i am using like login/passwd/useradd.
I currently have them installed on my ubuntu computer and would like to know if there is a way to install them on my board ?
I naively tried to copy past the binary of the computer to the board but i am stuck with a Syntax error: word unexpected (expecting ")") error...
If i can't copy/past them then i can i do it ?

Cannot Execute Binary File

hello everyone,
I created a script file (info.sh) in linux centos 6.
location of file is '/etc/init.d/info.sh'
content of file is:

#!/bin/sh
#To get the MAC address
ifconfig | grep HWaddr
#To get the HDD serial no.
hdparm -I /dev/sd? | grep 'Serial\ Number'
#To get the HDD size
hdparm -I /dev/sda |grep "device size"

gave the permission by: chmod 777 /etc/init.d/info.sh
but when i run this file by: /etc/init.d/info.sh
it gives an error like...
-bash: /etc/init.d/info: cannot execute binary file

what should i do?? Actually i have to run this file during boot up..

thanks in advance..

What Happened To Gnuplot?

In my Ubuntu 14.04 something happened to gnuplot app. When I invoke a command gnuplot filename.gnu no canvas is generated. I think it began about a month ago but at that time I worked on this machine via a remote desktop and I thought, mistakenly, that the plot actually was generated on the major machine and I could not see it. I operated at that time via a laptop. So, today is the first day I am testing this software on my desktop and lo and behold no plot is generated.

When command is run Ubuntu does not come to the command prompt. It gets suspended and waits. If I click RETURN button, the command prompt will again appear but where is the plot?

I hope I made my plight clear.

Needles to say I have used gnuplot many times in the past although perhaps in Ubunutu VM which I will test shortly.

I also made sure that gnuplot is installed, trying to do

Quote:
sudo apt-get install gnuplot
The result was that I do have it installed.

What is the problem?

Thanks, - A.

.o: File Not Recognized: File Format Not Recognized When Compiling

Hello,

I am working on a board (sbc6000x with at91sam9261 micro, linux 2.6.24 to be precise) and having some fun making script i wanted to make real application.
The board is coming with a cross compilation toolchain. When trying to make a simple "hello world" executable to print on the terminal there is no problem.
I open my terminal, give the path of the compiler, cd into the folder where my .c file is and then i type :
Code:
arm-linux-gcc -o hello hello.c

Which create my executable "hello" and this one is working. But like i said, this program only played with the terminal.

The board is starting with a script calling another executable which use the lcd display, i have the source of this executable. My idea was to look at what was in the source of this application (lots of folders and files) in order to understand how it was working. I wanted to test the toolchain on the source (with the makefile) to see if i was able to generate an executable from a application with folderS/fileS but when i try to "make" it i have this error.

In my understanding this is an object file but aside from that i don't see why it would not works.

Thank you for your future answers !

Vsftpd Not Allowing Local Users To Log On

I am trying to allow local users to us the ftp for my site (really, any user would work, I just thought this would be easiest). I am trying to make it so that I can upload themes, install plugins, etc on a WordPress site hosted on my Ubuntu 14.04 machine. Here is the contents of my vsftpd.conf file from /etc/

# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
#
# Run standalone? vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
listen=YES
#
# Run standalone with IPv6?
# Like the listen parameter, except vsftpd will listen on an IPv6 socket
# instead of an IPv4 one. This parameter and the listen parameter are mutually
# exclusive.
#listen_ipv6=YES
#
# Allow anonymous FTP? (Disabled by default)
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# If enabled, vsftpd will display directory listings with the time
# in your local time zone. The default is to display GMT. The
# times returned by the MDTM FTP command are also affected by this
# option.
use_localtime=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format.
# Note that the default log file location is /var/log/xferlog in this case.
#xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# You may restrict local users to their home directories. See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
#chroot_local_user=YES
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
# (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
#chroot_local_user=YES
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# Customization
#
# Some of vsftpd's settings don't fit the filesystem layout by
# default.
#
# This option should be the name of a directory which is empty. Also, the
# directory should not be writable by the ftp user. This directory is used
# as a secure chroot() jail at times vsftpd does not require filesystem
# access.
secure_chroot_dir=/var/run/vsftpd/empty
#
# This string is the name of the PAM service vsftpd will use.
pam_service_name=vsftpd
#
# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
# This option specifies the location of the RSA key to use for SSL
# encrypted connections.
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key

Mouse Input To Gnuplot In Ubuntu

Chapter 17 of gnuplot pdf manual (Mouse Input) says "The x11, pm, windows, ggi, and wxt terminals allow interaction with the current plot using the mouse." I wonder if my Ubuntu 13.04 has any of those, if not, then perhaps the three terminals (Terminal, UXTerm, Xterm) I can invoke here, maybe they also have the same property? The proper term is: are they mouse capable? Thanks, - A.