|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Getting an absolute pathname
Hi All,
Does anyone know of a command that, given a relative pathname, will return the absolute pathname? ie, If the current directory is /home/steve/release and in that there's a file called test.file, can I type <cmd> test.file and have it give me /home/steve/release/test.file? I know I can do it by using pwd and examining the given filename, but I'd really like something to tidy up any parent directory (..) references that may be there. I've a feeling that there's a standard command for this. Thanks Steve |
|
#2
|
|||
|
|||
|
man realpath
Last edited by guggach : November 16th, 2004 at 09:02 AM. Reason: typo |
|
#3
|
|||
|
|||
|
Thanks, but that doesn't seem to exist on my AIX 5.2 machine.
Steve |
|
#4
|
|||
|
|||
|
For portability, you should use the dirname and
basename utilities. Both exist on AIX 5.2. |
|
#5
|
|||
|
|||
|
OK, I'll work with that.
Thanks. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Getting an absolute pathname |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|