jQuery in Action, 2nd edition*
The moose likes Linux / UNIX and the fly likes Where is env.sh? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Where is env.sh?" Watch "Where is env.sh?" New topic
Author

Where is env.sh?

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1531
I am new to unix/linux, where can I find env.sh (I believe it is something like path/classpath or something like autoexec.bat on windows) ? I opened "env" under /usr/bin but it wasn't readable.


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5842
    
    7

Which Linux distro? Do you mean env or env.sh? If it is executable, and on the PATH, you can find it via:

which env.sh

On my CentOS box, I have a /bin/env which is a binary executable.

Perhaps if you would tell us what you are trying to accomplish, we might be able to help you better.


JBoss In Action
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1531

I tried



It says,




You ask me which Linux distro I have, I don't know. It is a remote machine we call it 'unix/linux box'. I use putty to connect to the same. I am told to investigate if there are 'mq' entries available (they were not available for one of our app in its configuration file). So everything is already done(from app point of view, its a java/j2ee app which I am investigating on), just that configurations are not proper. Somewhere I read we need to have entries in some script file so that it gets added/linked automatically(like classpath). I thought its "env" but when i opened, its contents were something strange (kind of some exe or so).

And can you get me a link/reference for file operations on linux. I know there are plenty, but I don't want to have a huge of it, just that how can I show contents of a file, search for some string, copy/paste etc stuff using commands.

Thanks.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

env (not env.sh) is a binary executable program. It's one of the core utilities on many distros.

I'd recommend googling for things like "Stupid Linux Tricks" if you want quick-and-dirty help on Linux. The number of text utilities alone is enormous, so those kinds of sites will give you the "tip of the iceberg", so to speak. A good Linux intro book wouldn't hurt, either.

To find out what Linux you're running, a good start is the "uname -a" command. For RedHat-like systems, you can also "cat /etc/redhat-release".

The 2 most popular distro types are RedHat-like and Debian-like. You can tell which family you're in by attempting to run the "rpm" and "dpkg" commands. If rpm can be executed, it's one of the RedHat distros (or SuSe). If "dpkg" works, it's most likely Debian or Ubuntu. On the off chance that neither works, but the "emerge" command does, they're running Gentoo. Otherwise it would be one of the more obscure ones.


Customer surveys are for companies who didn't pay proper attention to begin with.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5842
    
    7

So everything is already done(from app point of view, its a java/j2ee app which I am investigating on), just that configurations are not proper.

There is a huge difference between changing Linux configurations and Java EE application configurations. Well, maybe not that huge, they are probably both in text files that can be edited with a text editor. But if the issue is really with the Java EE app server, then you need to know which one it is and google for configuration information about it, not about Linux.
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1531
Tim Holloway wrote:
... To find out what Linux you're running, a good start is the "uname -a" command. For RedHat-like systems, you can also "cat /etc/redhat-release".


Thanks Tim!

I have also found The Linux Documentation Project page on net. And it looks really really really worthy.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

Akhilesh Trivedi wrote:
Tim Holloway wrote:
... To find out what Linux you're running, a good start is the "uname -a" command. For RedHat-like systems, you can also "cat /etc/redhat-release".


Thanks Tim!

I have also found The Linux Documentation Project page on net. And it looks really really really worthy.


TLDP is one of the Grand Old References for things Linux. I don't use it as much as I used to, but I actually have a book that basically gathered up all the TLDP documents, printed them on thin paper, and was probably 3 cm thick. And came with a CD for Red Hat Linux 2 in the back.

The main reason why I don't use TLDP as much as I used to is that it's mainly how-to docs and after about 15 years of Linux, I (allegedly) know most of the basics and so these days I'm looking at specific product websites. But it's still comforting to know that TLDP is there should I need it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Where is env.sh?