Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How can I view my currently established "symlinks"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Lyquid
n00b
n00b


Joined: 25 Jul 2002
Posts: 24
Location: South Lyon, MI

PostPosted: Fri Aug 02, 2002 2:45 pm    Post subject: How can I view my currently established "symlinks" Reply with quote

If I used the ln-s command to symlink the reference of my DVD drive to my CDROM, how can I tell if a symlink exists? Is it possible to view and remove existing symlinks?

Thanks.
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Fri Aug 02, 2002 2:51 pm    Post subject: Reply with quote

To check whether a file is a symbolic link, do "ls -l <file_name>". If you see an "l" in the first column of the output, it is a symlink. e.g.,
Code:

lrwxrwxrwx    1 root     root            1 Jun 19 16:22 boot -> .


To find symlinks, you can do something like:
Code:

find / -type l

Substitute whatever directory you want to search under for "/" above. You can remove a symlink by doing "rm <symlink_name>" just as you would a regular file. To remove all symlinks under a directory hierarchy, you can do:
Code:

find <dir> -type l -ok rm {} \;

This command is dangerous. Use with care.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum