Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.unix.shell > #833
| From | Uno <Uno@example.invalid> |
|---|---|
| Newsgroups | comp.unix.shell |
| Subject | Re: variable-length strings |
| Date | 2011-06-03 22:58 -0600 |
| Message-ID | <94tsbkFe3nU1@mid.individual.net> (permalink) |
| References | <94mfhcFngqU1@mid.individual.net> <slrniuf4u1.dhq.hjp-usenet2@hrunkner.hjp.at> |
On 06/02/2011 07:44 AM, Peter J. Holzer wrote: > ["Followup-To:" header set to comp.unix.shell.] > On 2011-06-01 09:36, Uno<Uno@example.invalid> wrote: >> q2) [I imagine that I have a distinct question for each listed ng] In >> testing, I've noticed a difference in file sizes between what I upload >> with ftp and what I download. The files are 60 megs, conceived by >> apple, and I can't show what I'm saying until I get ftp working. >> >> There's no way I can look at these files with a hex editor and my eyes. >> Doesn't unix have a built-in way to compare them? > > There's cmp, but it only shows you where the first difference is. > > There's diff, but it is intended for text files. > > You could convert both files with od or hd and diff those. But that > doesn't work well. > > I think Emacs has a binary-diff mode, but I'm from the vi fraction. > > So, back in the mid 1990's I wrote bdiff (binary diff): > http://www.hjp.at/programs/bdiff/ > > I guess I should dust it off, write a man-page and try to get it added > to some linux distribution. But I very rarely need it myself. > > hp > Thx, peter, I want to get that running, but I'm mired in the type of the thing that a guy gets stuck in, when it's still his first year of a stable *nix dual-booting system. My current difficulty is typical for me in that I start trying to wrangle something with perl, and pretty soon it shifts into a problem with figuring out more unix. So I downloaded your software, extracted it on a thumbdrive, compiled it, told ubuntu to run it, and it told me I don't have permission. $ sudo chmod 777 bdiff $ ls -l -rw-r--r-- 1 dan dan 12414 2011-06-02 16:29 bdiff That was my last try with that executable. So I tried it again. $ pwd /media/KINGSTON/bdiff-1.0 $ cc -Wall -Wextra bdiff.c -o bdiff2 bdiff.c: In function ‘readfile’: bdiff.c:98: warning: comparison between signed and unsigned integer expressions bdiff.c: In function ‘findmatch’: bdiff.c:227: warning: comparison between signed and unsigned integer expressions bdiff.c:233: warning: comparison between signed and unsigned integer expressions bdiff.c: In function ‘main’: bdiff.c:296: warning: comparison between signed and unsigned integer expressions bdiff.c:342: warning: comparison between signed and unsigned integer expressions bdiff.c:350: warning: comparison between signed and unsigned integer expressions $ ./bdiff2 bash: ./bdiff2: Permission denied $ ls -l total 123472 -rw-r--r-- 1 dan dan 37155580 2011-05-30 16:54 after2.avi -rw-r--r-- 1 dan dan 37155580 2011-05-30 16:13 after3.avi -rw-r--r-- 1 dan dan 4892982 2011-06-01 18:13 after.avi -rw-r--r-- 1 dan dan 5289 1998-12-12 12:04 ascfile-1 -rw-r--r-- 1 dan dan 5428 1998-12-12 12:04 ascfile-2 -rw-r--r-- 1 dan dan 12414 2011-06-02 16:29 bdiff -rw-r--r-- 1 dan dan 34907 2011-06-02 16:21 bdiff-1.0.tar.gz -rw-r--r-- 1 dan dan 12414 2011-06-03 22:45 bdiff2 -rw-r--r-- 1 dan dan 10267 2011-06-03 22:45 bdiff.c -rw-r--r-- 1 dan dan 4892982 2011-06-01 17:13 before.avi -rw-r--r-- 1 dan dan 38623 1998-12-12 12:05 binfile-1 -rw-r--r-- 1 dan dan 39037 1998-12-12 12:05 binfile-2 -rw-r--r-- 1 dan dan 148 1998-12-12 12:05 dotest -rw-r--r-- 1 dan dan 37155580 2011-05-30 17:54 hydrogenalternativefromfossils.avi -rw-r--r-- 1 dan dan 4893068 2011-03-29 16:17 jac1.avi -rw-r--r-- 1 dan dan 136 1998-12-12 12:04 Makefile $ chmod 777 bdiff2 $ ./bdiff2 bash: ./bdiff2: Permission denied $ ls -l total 123472 -rw-r--r-- 1 dan dan 37155580 2011-05-30 16:54 after2.avi -rw-r--r-- 1 dan dan 37155580 2011-05-30 16:13 after3.avi -rw-r--r-- 1 dan dan 4892982 2011-06-01 18:13 after.avi -rw-r--r-- 1 dan dan 5289 1998-12-12 12:04 ascfile-1 -rw-r--r-- 1 dan dan 5428 1998-12-12 12:04 ascfile-2 -rw-r--r-- 1 dan dan 12414 2011-06-02 16:29 bdiff -rw-r--r-- 1 dan dan 34907 2011-06-02 16:21 bdiff-1.0.tar.gz -rw-r--r-- 1 dan dan 12414 2011-06-03 22:45 bdiff2 -rw-r--r-- 1 dan dan 10267 2011-06-03 22:45 bdiff.c -rw-r--r-- 1 dan dan 4892982 2011-06-01 17:13 before.avi -rw-r--r-- 1 dan dan 38623 1998-12-12 12:05 binfile-1 -rw-r--r-- 1 dan dan 39037 1998-12-12 12:05 binfile-2 -rw-r--r-- 1 dan dan 148 1998-12-12 12:05 dotest -rw-r--r-- 1 dan dan 37155580 2011-05-30 17:54 hydrogenalternativefromfossils.avi -rw-r--r-- 1 dan dan 4893068 2011-03-29 16:17 jac1.avi -rw-r--r-- 1 dan dan 136 1998-12-12 12:04 Makefile $ What am I missing? Shit's on fire down here in the US SW. Arizona has a 400,000 acre fire that is 0% contained. I just wish they would keep all their Arizonaness to themselves. The smoke hurts my eyes. Tja. -- Uno
Back to comp.unix.shell | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
variable-length strings Uno <Uno@example.invalid> - 2011-06-01 03:36 -0600
Re: variable-length strings ccc31807 <cartercc@gmail.com> - 2011-06-01 07:13 -0700
Re: variable-length strings Uno <Uno@example.invalid> - 2011-06-02 10:54 -0600
Re: variable-length strings "George Mpouras" <nospam.gravitalsun@hotmail.com.nospam> - 2011-06-01 17:01 +0300
Re: variable-length strings "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2011-06-02 15:33 +0200
Re: variable-length strings "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2011-06-02 15:44 +0200
Re: variable-length strings Willem <willem@toad.stack.nl> - 2011-06-02 14:19 +0000
cmp (was: variable-length strings) "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2011-06-02 18:15 +0200
Re: variable-length strings Uno <Uno@example.invalid> - 2011-06-03 23:21 -0600
Re: variable-length strings "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2011-06-04 02:43 -0400
Re: variable-length strings bonomi@host122.r-bonomi.com (Robert Bonomi) - 2011-06-03 11:08 -0500
Re: variable-length strings Uno <Uno@example.invalid> - 2011-06-04 00:03 -0600
Re: variable-length strings pacman@kosh.dhis.org (Alan Curry) - 2011-06-04 20:18 +0000
Re: variable-length strings Uno <Uno@example.invalid> - 2011-06-07 23:00 -0600
cmp (was: variable-length strings) "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2011-06-04 10:29 +0200
Re: cmp Uno <Uno@example.invalid> - 2011-06-07 22:38 -0600
Re: cmp pacman@kosh.dhis.org (Alan Curry) - 2011-06-08 05:22 +0000
Re: cmp Uno <Uno@example.invalid> - 2011-06-09 16:10 -0600
Re: variable-length strings Uno <Uno@example.invalid> - 2011-06-03 22:58 -0600
bdiff (was: variable-length strings) "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2011-06-04 10:52 +0200
Re: bdiff Uno <Uno@example.invalid> - 2011-06-08 21:59 -0600
Re: bdiff Ian Collins <ian-news@hotmail.com> - 2011-06-09 16:08 +1200
Re: bdiff Uno <Uno@example.invalid> - 2011-06-08 22:20 -0600
Re: bdiff Uno <Uno@example.invalid> - 2011-06-09 02:57 -0600
Re: bdiff Janis Papanagnou <janis_papanagnou@hotmail.com> - 2011-06-09 11:10 +0200
Re: bdiff bonomi@host122.r-bonomi.com (Robert Bonomi) - 2011-06-19 06:10 -0500
Re: bdiff Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-06-09 07:13 -0400
Re: bdiff Uno <Uno@example.invalid> - 2011-06-09 13:30 -0600
Re: variable-length strings Uno <Uno@example.invalid> - 2011-06-03 23:11 -0600
Re: variable-length strings "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2011-06-04 10:55 +0200
csiph-web