tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Summary: Script Location
@ 2000-03-01 21:48 PETESADL
  0 siblings, 0 replies; only message in thread
From: PETESADL @ 2000-03-01 21:48 UTC (permalink / raw)
  To: tru64-unix-managers

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-03-01 21:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-03-01 21:48 Summary: Script Location PETESADL

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