Hi
The [tt]readlink[/tt] command is usefull to find out the target of a symbolic link. Any idea for similar commands, in case [tt]readlink[/tt] is not available ?
Ok, I can write a function, thats not a problem. ( No error checking in below codes. )
But while a [tt]readlink()[/tt] system call is available, I hope there is a somehow standard and faster way to do this.
Thanks.
Feherke.
The [tt]readlink[/tt] command is usefull to find out the target of a symbolic link. Any idea for similar commands, in case [tt]readlink[/tt] is not available ?
Ok, I can write a function, thats not a problem. ( No error checking in below codes. )
Code:
readlink() { ls -ld "$1" | sed 's/.*-> //'; }
[gray]# or[/gray]
readlink() { find "$1" -mindepth 0 -maxdepth 0 -printf "%l\n"; }
Thanks.
Feherke.