I just started learning about the Linux command line with the book "The Linux Command Line". I was trying to create a hard link by following instructions from the book and typing this command: ln fun fun-hard. But I kept getting this result
ln: fun: hard link not allowed for directory
After doing some research, I found that hard links can't be created in directories. But if this is correct, why does the book include instructions for creating a hard link in a directory? Thanks for your help.
lsoutput right after that.funis clearly supposed to be a file. In fact it looks likefunwas created a couple of sections previously by copying/etc/passwd, another file. How did you end up withfunas a directory following those instructions? – muru Aug 27 '21 at 02:23