[Magic-dev] ~/.magic breaks UNIX 'file' command on OS X
David Fang
fang at csl.cornell.edu
Wed May 18 14:45:18 EDT 2005
Philippe,
Ah, excellent, thanks for the suggestion. I will give this a try.
> > I've discovered that a .magic file sitting in one's home directory can
> > break the UNIX 'file' command which is frequently used to check the
> > contents of libraries during compiles/builds.
>
> Yep, this is a known issue. The work-around is to define an alias for the
> 'file' command. I have the following line in my .bashrc (because I use
> bash as my shell):
>
> alias file="/usr/bin/file -m /usr/share/misc/magic"
>
> You may need to customize the path for your own environment.
>
> Perhaps Tim Edwards could add a "feature" so that Magic looks for .magic
> or .magicrc, that way we wouldn't need to worry about the 'file' command,
> while keeping things backwards compatible.
I vote for adding .magicrc, but also keeping around .magic as
a secondary place to search (perhaps issue a warning at the prompt?).
David Fang
Computer Systems Laboratory
Electrical & Computer Engineering
Cornell University
http://www.csl.cornell.edu/~fang/ -- *gag* work in progress
More information about the magic-dev
mailing list