Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • For some reason, it seems to work without the -H and/or -L. Anyhow: : > file was new for me and is great! Also: According to the UNIX philosophy ["… programs that do one thing and do it well"] there is ln for creating links. But then, why not make this possible and makes sense in the workflow :) Commented Oct 9, 2013 at 12:44
  • @chirp the link will be copied without the -H but it will be a soft link. Adding the -H makes it convert to a hard link. Commented Oct 9, 2013 at 14:12
  • 1
    @chirp I just tried the exact command from the info page with and without the -H and one gave me a hardlink and the other a symlink with different inodes. This was on an ext4 filesystem running Debian and cp (GNU coreutils) 8.21. Do you really get different results? If you want to post somewhere, ping me in chat. Commented Oct 10, 2013 at 0:05
  • 1
    just sent a bug report to coreutils mailing list on a possible bug in the documentation. Commented Oct 10, 2013 at 2:05
  • 1
    As an FYI, : also works for ksh, csh, and OpenBSD's sh (which is really based on pdksh). Commented Oct 10, 2013 at 2:13