Results 1 to 5 of 5
I've read some tutorials, but have not stumbled on this,
so..
how do i find the file to which a symbolic link points to
thanks...
- 07-22-2008 #1Just Joined!
- Join Date
- Oct 2007
- Posts
- 31
How do i find the file where symlink points to?
I've read some tutorials, but have not stumbled on this,
so..
how do i find the file to which a symbolic link points to
thanks
- 07-22-2008 #2
Hi,
Just run this command:
From the output lrwxrwxrwx, the l means that its the soft link grub.conf pointing the real one which is located in ../boot/grub/grub/confCode:[root@greg named]# ls -l lrwxrwxrwx 1 root root 22 Jul 3 00:12 grub.conf -> ../boot/grub/grub.conf
For finding the file which it points to run this
Hope it helps.Code:find / -name grub.conf -print[/B] or [B]# locate grub.conf
Rgds,
gLast edited by devils casper; 07-22-2008 at 09:32 AM. Reason: Added [code]...[/code] tags.
- 07-22-2008 #3
And the 'file' command does the same thing:
Code:file /path/to/symlink symlink: symbolic link to `/example/targetfile'
Can't tell an OS by it's GUI
- 07-24-2008 #4Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
And the -L option to ls will unroll the link and give you stats on the real file.
- 08-11-2009 #5Just Joined!
- Join Date
- Aug 2009
- Posts
- 3
readlink
try out the 'readlink' command.
'readlink' will "display value of a symbolic link on standard output."
If you really just want the link and nothing else you can add '-n'
"-n, --no-newline do not output the trailing newline"Last edited by BryanFRitt; 08-11-2009 at 04:31 PM. Reason: formated text


Reply With Quote