tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: Script or tool to show users' current working directories?
@ 2001-04-23 15:43 Hugh.Pritchard
  0 siblings, 0 replies; 2+ messages in thread
From: Hugh.Pritchard @ 2001-04-23 15:43 UTC (permalink / raw)
  To: tru64-unix-managers

Pascal Van Bever suggested I try lsof.

For those of you who thought I couldn't think of a way to find my *own*
current working directory, yes, I do know the 'pwd' command.  And I
didn't need the users' *starting* current working directories, their
$HOME.  I did consider (briefly) re-doing all users' /etc/passwd entries
so they used ksh--ksh maintains the environment variable $PWD, which is
what I want to see, and which is visible using the 'ps e'
(BSD-compatible 'show environment' option) command.

--
   Hugh Pritchard (Tier Technologies), 202-724-4690
   D.C. Ofc of Corporation Counsel, Child Support Enforcement Division
   mailto:Hugh.Pritchard@DC.gov

> From: Van Bever, Pascal [mailto:Pascal.VanBever@compaq.com]
> Sent: Monday, April 23, 2001 10:02 AM
> To: 'Hugh.Pritchard@DC.gov'
> Subject: RE: Script or tool to show users' current working
directories?
>
> Hello Hugh,
>
> not sure if I understand you correctly...
> if you're looking for the current working directory of a
> logged in user (process) you may have a look at lsof (list open file)
> # lsof -p <pid> | grep cwd
>
> info on lsof are at
> http://www.tru64unix.compaq.com/demos/ossc-v5.0/html/lsof.htm

> -----Original Message-----
> From: Hugh.Pritchard@DC.gov [mailto:Hugh.Pritchard@DC.gov]
> Sent: Monday, 23 April 2001 15:47
> To: tru64-unix-managers@ornl.gov
> Subject: Script or tool to show users' current working directories?
>
> Is there a tool, script, or code somewhere to display users' current
> working directories?
> We have an old database system (UniVerse) which relies on
> finding files
> in a user's CWD.
>
> --
>    Hugh Pritchard (Tier Technologies), 202-724-4690
>    D.C. Ofc of Corporation Counsel, Child Support Enforcement Division
>    mailto:Hugh.Pritchard@DC.gov
>

^ permalink raw reply	[flat|nested] 2+ messages in thread
* Summary: Script or tool to show users' current working directories?
@ 2001-04-24 22:41 richard n. frank
  0 siblings, 0 replies; 2+ messages in thread
From: richard n. frank @ 2001-04-24 22:41 UTC (permalink / raw)
  To: tru64-unix-managers

Please forgive me for summarizing someone elses question with my answer...
I just thought some folks might find this useful.  The script is named cwt
and it either changes the dtterm window title to the parameter you enter 
when you run the script (i.e. cwt newtitle) or it changes the dtterm window
title to the current working directory.  It is kind of handy if you are 
working on a lot of different windows.  The parameter "name=$('pwd')" can
be changed to something like "name=$(hostname)" to set the window title to 
the hostname if you are working on several systems.

The 'echo' statement is entered with the keystrokes in the #comment line.

rich
-----------------------------------




#ksh cwt  1. apr. 1997  rnf
if test "" = "$1"
   then
      name=$('pwd')
      echo " Enter a parameter with the command or title=hostname. "
   else
      name=$1
fi

echo " ^[]0;$name^G "

# "<ctrl>v<ctrl>[];$name<ctrl>v<ctrl>G"


--------------------------------------------------------------------------------

>
> Is there a tool, script, or code somewhere to display users' current
> working directories?
> We have an old database system (UniVerse) which relies on finding files
> in a user's CWD.
> 
> --
>    Hugh Pritchard (Tier Technologies), 202-724-4690
>    D.C. Ofc of Corporation Counsel, Child Support Enforcement Division
>    mailto:Hugh.Pritchard@DC.gov
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-04-24 22:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-23 15:43 SUMMARY: Script or tool to show users' current working directories? Hugh.Pritchard
  -- strict thread matches above, loose matches on Subject: below --
2001-04-24 22:41 Summary: " richard n. frank

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