- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: symlinks -r -d /
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2008 09:30 AM
тАО05-20-2008 09:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2008 09:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2008 10:00 AM
тАО05-20-2008 10:00 AM
Re: symlinks -r -d /
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2008 10:14 AM
тАО05-20-2008 10:14 AM
Re: symlinks -r -d /
I guess that it means that you didn't take
the "man symlinks" hint offered earlier.
"man symlinks":
dangling links are those for which the target of the link does not cur-
rently exist. This commonly occurs for absolute links when a filesys-
tem is mounted at other than its customary mount point (such as when
the normal root filesystem is mounted at /mnt after booting from alter-
native media).
For information on most commands, "man
command" is often helpful. In this case,
"man symlinks".
Did you try "man symlinks"?
"man symlinks" might help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2008 12:16 PM
тАО05-20-2008 12:16 PM
Re: symlinks -r -d /
A simple way to find dangling symbolic links is to use this Perl snippet:
# perl -MCwd=realpath -MFile::Find -wle 'find(sub{print $File::Find::name," -> ",realpath($_) if -l && ! -e},@ARGV)' /path
Pass the /path argument that represents the directory that you want to examine. If there are dangling links, this reports them. For example, do:
# touch /tmp/myfile
# ln -s /tmp/myfile /tmp/mylink
# rm /tmp/myfile
# perl ...
/tmp/mylink -> /tmp/myfile
...which exposes '/tmp/mylink' as a dangling symbolic link.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2008 09:50 PM
тАО05-24-2008 09:50 PM
Re: symlinks -r -d /
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-25-2008 02:27 AM
тАО05-25-2008 02:27 AM
Re: symlinks -r -d /
do I understand correct ?
symlinks -r -d /
cannot damage my linux system ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-25-2008 10:28 AM
тАО05-25-2008 10:28 AM
Re: symlinks -r -d /
It _probably_ won't. I can _imagine_ someone
using a dangling link for data storage, like
a simple text file, so I wouldn't _guarantee_
that it's safe.
ln -s 'Any text may be stored here.' fred
symlinks .
dangling: /house/antinode/fred -> Any text may be stored here.
Have you looked at the output without "-d",
to see what will happen with "-d"?
If you have any doubts about the safety of
"symlinks -d", why do you want to do it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2008 07:22 PM
тАО05-26-2008 07:22 PM
Re: symlinks -r -d /
That's exactly what netscape does to prevent multiple instances. It has a .lock that is linked to the value of DISPLAY and maybe the PID.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2008 05:28 AM
тАО05-27-2008 05:28 AM
Re: symlinks -r -d /
> symlinks -r -d / ...cannot damage my linux system ?
If it is a *personal* system, then it's up to you to choose. If this is a company/production server, then I'd be a bit more careful.
Instead of capraciously removing all dangling links, I would do:
# symlinks -r / | grep dangling
...and exaxmine the output. Then, perhaps on a case-by-case basis make a determination to manually remove ('rm') dangling links that you don't want.
A dangling link isn't necessarily a "bad thing". For instance, you might want to keep symbolic links to an installation CD/DVD/USB. I might have:
# symlinks -r /home
dangling: /home/jrf/install -> /media/JRF_DISK/ARCHIVE.tar
...which I might wish to retain for times when I actuall mount a USB device named "JRF_DISK".
Regards!
...JRF...