Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #12189

Re: composition ? piping

From Charlie Gibbs <cgibbs@kltpzyxm.invalid>
Newsgroups comp.os.linux.misc
Subject Re: composition ? piping
Date 2014-09-29 15:47 +0000
Organization NewsGuy - Unlimited Usenet $23.95
Message-ID <slrnm2ivls.491.cgibbs@killer-penguin.python.org> (permalink)
References (3 earlier) <lvnbr5$4ng$1@dont-email.me> <lvp8qn$625$1@dont-email.me> <AABUJR/U2YIAAAz9.A1.flnews@WStation3.stz-e.de> <YZgVv.123612$_r4.55026@fx25.iad> <AABUKRP7vA4AAFX+.A1.flnews@WStation3.stz-e.de>

Show all headers | View raw


On 2014-09-29, Michael Baeuerle <michael.baeuerle@stz-e.de> wrote:

> Lew Pitcher wrote:
>
>> When trying to determine the content of a file, which makes more sense:
>> 1) look at a component of the filename and guess it's significance (it might
>>    be wrong or misleading), or
>> 2) to look at the content of the file?
>> 
>> To me, it makes more sense to see what's in the file, rather than guess it's
>> contents based on an arbitrary textual value assigned as the file's name.

<snip>

> I agree for this case. But consider a custom file format of a company
> that "file" don't know. The company maybe want to indicate the file type
> to make it easier for their customers to find or identify such files
> (something like "ls -l *.xyz" is much simpler and faster than "show me
> all files which content looks like xyz").

There's nothing that says you can't have conventions for file suffixes;
indeed, most of us agree this is a Good Thing.  But Windows gives them
far too much weight.

>> As for executables, even the kernel inspects the contents of the executable
>> file to determine it's format and contents. What you need is to use the
>> kernel's binfmt_misc interface, and register an execution interpreter for
>> the specific file contents. Once that's done, you chmod a+x your file, and
>> execute it from the commandline
>
> Yes, and this is good behaviour until it only works with the "x" bit set
> in the metadata. I don't want to justify things like detecting
> executables via the extension ".EXE"!

Yet this is the logical consequence of depending on file extensions -
especially considering how fond Microsoft is of broken designs.

> But for normal users (especially former Windows users) it is sometimes
> convenient to have *data* files (that are not executable) with
> extensions that labels their content.

Again, few of us, as strongly as we push for content-based file typing,
would deny that file suffix conventions are useful.  (Note the subtle
distinction between "suffix" and "extension".)  We just feel that it
should not be the sole - or critical - determinant.

-- 
/~\  cgibbs@kltpzyxm.invalid (Charlie Gibbs)
\ /  I'm really at ac.dekanfrus if you read it the right way.
 X   Top-posted messages will probably be ignored.  See RFC1855.
/ \  HTML will DEFINITELY be ignored.  Join the ASCII ribbon campaign!

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

composition ? piping Unknown <dog@gmail.com> - 2014-08-21 20:50 +0000
  Re: composition ? piping Joe Beanfish <joebeanfish@nospam.duh> - 2014-08-22 13:39 +0000
  Re: composition ? piping John Hasler <jhasler@newsguy.com> - 2014-08-22 10:16 -0500
    Re: composition ? piping Rich <rich@example.invalid> - 2014-08-22 17:13 +0000
    Re: composition ? piping Unknown <dog@gmail.com> - 2014-09-21 13:09 +0000
      Re: composition ? piping Jerry Peters <jerry@example.invalid> - 2014-09-21 20:18 +0000
        Re: composition ? piping Joe Beanfish <joebeanfish@nospam.duh> - 2014-09-22 13:39 +0000
          Re: composition ? piping Michael Baeuerle <michael.baeuerle@stz-e.de> - 2014-09-26 08:26 +0000
            Re: composition ? piping Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2014-09-26 13:01 -0400
              Re: composition ? piping Michael Baeuerle <michael.baeuerle@stz-e.de> - 2014-09-29 08:54 +0000
                Re: composition ? piping Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2014-09-29 15:47 +0000
                Re: composition ? piping John Hasler <jhasler@newsguy.com> - 2014-09-29 11:41 -0500
            Re: composition ? piping "Anonymous Remailer (austria)" <mixmaster@remailer.privacy.at> - 2014-09-27 12:49 +0200
      Re: composition ? piping Bill Marcum <bill.marcum57@yahoo.com> - 2014-09-25 14:58 -0400

csiph-web