ls feature lacking: whereami command(?)

ls feature lacking: whereami command(?)

Post by Neil Zanell » Fri, 25 May 2001 11:28:16



Hello,

Suppose I find myself under a bunch of symlinks and there
is a file called foo and I want to know the REAL full
absolute pathname to foo _without_ symlinks. Is there
a way to do this in Unix/Linux? Note that pwd does not
do this. I want a pwd that shows real paths, not symlinkes.
An appropriate name for such a command would be wheeami.

Does such functionality exist?

Thanks,

Neil

 
 
 

ls feature lacking: whereami command(?)

Post by Frederick Bruckm » Fri, 25 May 2001 12:31:29




Quote:

> Suppose I find myself under a bunch of symlinks and there
> is a file called foo and I want to know the REAL full
> absolute pathname to foo _without_ symlinks. Is there
> a way to do this in Unix/Linux? Note that pwd does not
> do this. I want a pwd that shows real paths, not symlinkes.
> An appropriate name for such a command would be wheeami.

NetBSD "pwd" does this. There's no portable distribution,
but the source consists of only a single file, so maybe
it'll compile on your system without too much fuss:

http://cvsweb.netbsd.org/bsdweb.cgi/basesrc/bin/pwd/
--

Frederick

 
 
 

ls feature lacking: whereami command(?)

Post by Frederick Bruckm » Fri, 25 May 2001 12:41:48




Quote:

> NetBSD "pwd" does this...

It might be even easier than that. "pwd" is usually a shell built-in,
and both pdksh and bash have "pwd -P" or "set -o physical". Check the
docs for your shell (or get a better one). ;-)
--

Frederick

 
 
 

ls feature lacking: whereami command(?)

Post by Cyrille Lefevr » Sat, 26 May 2001 12:21:10



> Suppose I find myself under a bunch of symlinks and there
> is a file called foo and I want to know the REAL full
> absolute pathname to foo _without_ symlinks. Is there

this question has been treated a few days (weeks?) ago.
check the archive. don't remember the subject.

Quote:> a way to do this in Unix/Linux? Note that pwd does not

s/Unix//

Quote:> do this. I want a pwd that shows real paths, not symlinkes.

/bin/pwd is your friend, not the shell buildin one except if
the -P option is supported. check your manual pages.

Cyrille.
--


Supprimer "%no-spam" et ".invalid" pour me repondre. | about who it chooses
Remove "%no-spam" and ".invalid" to answer me back.  | to be friends with.

 
 
 

1. To: Unix gurus: xterm lack important feature (?)

Hello,

I have posted this already but with no successful reply:

I dial up as a normal user with

su -c /usr/sbin/dip /stuff/dialup.dip

enter the root password, and get connected, all within an xterm.

However,

/usr/X11R6/bin/xterm -e su -c "/usr/sbin/dip /stuff/dialup.dip"

does not seem to work for some (stupid?) reason. I need to do this to be able to

bind the action to a button on my window manager's buttonbox.

Hence dialing up becomes as easy as clicking a button and entering the root password.

(i) Why does ot not work? The script seems to run fine but just before it is done the window

    exits and I hear the modem clicking a second time, hence disconnecting.

(ii) Is there an xterm option similar to -e which DOES NOT close the window after termination of the
     program being executed?

Thanks for your advice,

(any alternative solutions to my problem are very appreciated)

Neil Zanella

2. Token Ring / Thomas Conrad

3. ls color highlighting as in the ls command in the slackware distribution

4. installing linuxppc 4

5. Another Fvwm feature lacking in XP

6. Weird double math results ? Printf() says equal operand says no. Help!

7. ls command gives "Out of memory for ls" error

8. yo yo, dis message is tru

9. Lack of feature for 'date' cmd

10. LS command question (How do I omit the LINK field from the output of the command)?

11. /usr/bin/ls /usr/ucb/ls /usr/local/bin/ls

12. _tabs_ command, or the lack thereof

13. Command line switchable user adding feature