tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: PETESADL () aol ! com
To: tru64-unix-managers
Subject: Summary: Script Location
Date: Wed, 01 Mar 2000 21:48:12 +0000	[thread overview]
Message-ID: <96079341819270.tru64-unix-managers.marc@archive.invalid> (raw)

Thanks to: 
  tpb@doctor.zk3.dec.com               (Dr. Tom Blinn)
  r.westlake@mail.cryst.bbk.ac.uk    (Richard Westlake)
  lucio@ifctr.mi.cnr.it                       (Lucio Chiappetti) 
  pas@unh.edu                               (Paul A Sand)
  Jeff.Cole@tfn.com                         (Cole, Jeff)
  jeff@popmail.med.nyu.edu             (Jeff Berliner)
  in-house Sys Admin                      (Bill Heffernan)

Original question
   A script has been started (sh ./script_a) by a user and is running...,
   how would I (another user) find out from what directory was the script
   started?

To clarify
   I run the ps command with the -u and the original user and all I see
   under the command field is "sh ./script_a".
   I am looking for a way for Unix to tell me the directory of a
   command/process that was started without the directory reference.

Conclusion
   Unfortunately, all the "ps" output is going to show you is the command
   arguments, that is, $0 through $n, and if they don't include a real
   path (and in the case of a shell script invoked via "exec", they don't
   seem to do so), it isn't going to show up that way.

Indirect Solution (provided in-house)
   We were able to use the find command to locate all the locations that
   the command existed and then do an fuser command against the located
   files. That gave us PIDs that we then related back to the command/process
   and indirectly identified the file locations.

                 reply	other threads:[~2000-03-01 21:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox