Results 1 to 4 of 4

Thread: Crash when navigating to /usr/bin/ - broken links

  1. #1
    Join Date
    Mar 2006
    Location
    Oxford, OH, USA
    Beans
    1,055
    Distro
    Ubuntu 16.04 Xenial Xerus

    Crash when navigating to /usr/bin/ - broken links

    Hello,

    Apparently I have some broken links in /usr/bin/ which causes nautilus to crash and restart. If I navigate to /usr/bin/ using gnome-commander I can see the files, as well as using terminal.

    How do I figure out which links are broken so that I can delete them?

    Would this work? http://www.gentoo-wiki.info/HOWTO_Find_broken_links


    - CH
    ________________________________
    System76 Lemur Laptop
    Ubuntu Xenial Xerus LTS 16.04
    Linux Registered User #434330

  2. #2
    Join Date
    Apr 2010
    Location
    England
    Beans
    3,286

    Re: Crash when navigating to /usr/bin/ - broken links

    Code:
    ls -lL /usr/bin 2>/dev/null | grep "\?"
    Works for me.

    Code:
           -L, --dereference
                  when showing file information for a symbolic link, show informa‐
                  tion  for  the file the link references rather than for the link
                  itself
    EDIT: If you want to generate a nicely formatted list (pipeable into rm), try this:
    Code:
    ls -lL /usr/bin 2>/dev/null | grep "\?" | sed "s/l[\?[:space:]*]*//g" | tr '\n' ' ' > ~/brokenlinks.txt
    Instead of redirecting the output to a file, you can use backticks with rm:
    Code:
    sudo rm `ls -lL /usr/bin 2>/dev/null | grep "\?" | sed "s/l[\?[:space:]*]*//g" | tr '\n' ' '`
    Make sure that the command works correctly for you before you try this though.
    Last edited by WorMzy; May 30th, 2011 at 06:47 PM. Reason: replaced reference to my home folder with /usr/bin
    http://xkcd.com/293/
    There are 10 kinds of people in this world: Those who understand ternary, those who don't, and those who confuse it with binary.

  3. #3
    Join Date
    Mar 2006
    Location
    Oxford, OH, USA
    Beans
    1,055
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Crash when navigating to /usr/bin/ - broken links

    Okay, here's what I get:

    ls -lL /usr/bin 2>/dev/null | grep "\?"
    l????????? ? ? ? ? ? ompi-checkpoint
    l????????? ? ? ? ? ? ompi-restart
    l????????? ? ? ? ? ? orte-checkpoint
    l????????? ? ? ? ? ? orte-restart
    l????????? ? ? ? ? ? trash4


    And here's the screenshot from gnome-commander, in which I suspected the dead links (attached) with caution triangles.

    So...I should just delete these files and I should be okay?

    - CH
    Attached Images Attached Images
    ________________________________
    System76 Lemur Laptop
    Ubuntu Xenial Xerus LTS 16.04
    Linux Registered User #434330

  4. #4
    Join Date
    Apr 2010
    Location
    England
    Beans
    3,286

    Re: Crash when navigating to /usr/bin/ - broken links

    Well, I've never had the problem you're having, so I can't say for certain whether those links would cause it. But those are definitely dead links; so removing them won't do any harm.
    http://xkcd.com/293/
    There are 10 kinds of people in this world: Those who understand ternary, those who don't, and those who confuse it with binary.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •