Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 32 or 64

Ray Andrews wrote on Wed, Dec 21, 2016 at 11:15:20 -0800:
> Now that I have both 32 bit and 64 bit versions of various binaries, whereas
> I used to just store them in a /Bin directory which is on my path, now, if
> I'm jumping back and forth between 32 bit Debian and 64 bit Debian, whereas
> previously different installs could share the same /Bin directory (all being
> 32 bit previously)

Don't share the /bin directory between OS installs.  Doing so is liable
to leave one of the two OSes unbootable at some point.

That's assuming /bin is on the / partition.  if /bin is a symlink to
/usr/bin [as seems to be fashionable nowadays] and /usr is its own
partition, then sharing that partition can be made to work, with some
care.  But I don't think that's what you have.

> now I hafta be able to distinguish 32 from 64, so I'm
> thinking to symlink /Bin to either /Bin32 or /Bin64 and I'm wondering if
> there might be a simple way for zsh to make that link for me based on
> knowing if either itself, or the kernel is 32 or 64 bit.  I could test the
> output of 'uname -r' of course, but I'd not be surprised if zsh can do it
> more elegantly and robustly than checking for substrings in the kernel name.

For future reference, there's `uname -m`.

But again: I would recommend just giving each OS its own partition.
That's a lot less likely to break.



Messages sorted by: Reverse Date, Date, Thread, Author