Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Tuesday December 01 2015, @07:50PM   Printer-friendly
from the features-are-beneficial-bugs dept.

We make very careful considerations about the interface and operation of the GNU coreutils, but unfortunately due to backwards compatibility reasons, some behaviours or defaults of these utilities can be confusing.

This information will continue to be updated and overlaps somewhat with the coreutils FAQ, with this list focusing on less frequent potential issues.

Good tips and reminders for those who don't work mostly with a CLI (Command Line Interface).


[What has been YOUR biggest CLI gotcha? -Ed.]

Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Interesting) by xav on Wednesday December 02 2015, @03:36AM

    by xav (5579) on Wednesday December 02 2015, @03:36AM (#270478)

    In the early 90s, Solaris made it possible to hard-link directories.
    So, out of curiosity, I tried "ln -f /usr/bin /test"
    Fine, it works! Now, let's delete this: "rm -r /test"
    OUCH!

    Now, I understand why most systems prevent users from hard-linking directories, even if it's technically possible.

    Starting Score:    1  point
    Moderation   +2  
       Interesting=2, Total=2
    Extra 'Interesting' Modifier   0  

    Total Score:   3  
  • (Score: -1, Troll) by Anonymous Coward on Wednesday December 02 2015, @04:06AM

    by Anonymous Coward on Wednesday December 02 2015, @04:06AM (#270487)

    Nobody should have a certain feature, just because you're a goddamn idiot who can't use it properly. How fucking selfish you are.

    • (Score: 3, Insightful) by Anonymous Coward on Wednesday December 02 2015, @04:14AM

      by Anonymous Coward on Wednesday December 02 2015, @04:14AM (#270488)

      A user hard linked / in one of his subdirectories, and you want to clean out his files. How fucking fucked you are.

  • (Score: 2) by FatPhil on Wednesday December 02 2015, @10:25AM

    by FatPhil (863) <reversethis-{if.fdsa} {ta} {tnelyos-cp}> on Wednesday December 02 2015, @10:25AM (#270553) Homepage
    I thought that was to keep the filesystem a DAG (in particular the Acyclic part).
    --
    Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves
  • (Score: 3, Informative) by TheRaven on Wednesday December 02 2015, @07:02PM

    by TheRaven (270) on Wednesday December 02 2015, @07:02PM (#270845) Journal

    Hard links are usually disallowed to prevent cycles. Without hard linked directories, you can do a depth-first search of a filesystem and be guaranteed to terminate. With them, tools like find become a lot more complicated. Symlinks are fine, because they're distinct from normal files (hard links aren't in a traditional UNIX filesystem: there's no notion of the canonical file and the link with a hard link, both paths are equally canonical), but hard links mean that you have to track the inode for every directory that you visit and check every other one against it to prevent infinite recursion.

    HFS+ does permit hard links on directories, but requires a special permission to create them. This is used by Time Machine to create hard links that point to older backups for unmodified subtrees.

    --
    sudo mod me up