Skip to content

[OT] Linux/UNIX question

4 messages · Edna Bell, (Ted Harding), Henrique Dallazuanna +1 more

#
Dear R Gurus:

I'm trying to find R on another Linux system.

I'm using the find command, (surprise), but I only want to see the
output where it exists, not all of the other stuff.

Is there an option that I could select, please?

Right now I have

find / -name R


TIA,
Sincerely,
Edna
#
On 20-Feb-08 21:51:54, Edna Bell wrote:
It depends on precisely what you want to find.
If you just want to locate the command "R" to run R,
then, assuming that when you're logged in your $PATH
contains what it should, the command

  which R

should find it for you. E.g.:

$ which R
/usr/bin/R

You may well find that your 'find' command generates
a stream of "permission denied" messages. Since these
emerge on the "stderr" channel (No 2) rather than on
"stdout" (No 1), you can do

find / -name R 2>/dev/null

However, since all the R libraries have a subdirectory
called R, you can still get a lot of output. But maybe
you want that, in this case ... !

Basically, though, if R is there the main "R" command
will be at /usr/bin/R, and the libraries will be at
/usr/lib/R.

You will also find an apparently identical "R" command at

/usr/lib/R/bin/R

but this is simply a symbolic link to /usr/bin/R

Hoping this helps,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 20-Feb-08                                       Time: 22:14:35
------------------------------ XFMail ------------------------------
#
Maybe also:

$ whereis R

In Debian based distributions works
On 20/02/2008, Edna Bell <edna.bell01 at gmail.com> wrote:

  
    
#
Edna Bell wrote:
Hi Edna,
When you say you want to see the output, I assume you mean output files 
created by R. This will be harder, as users can name the files whatever 
they please. If you know that your output files always have the 
extension ".Rout", you could try:

find / -name Rout

or on many Linux systems:

locate Rout

Jim