Basic Commands
and Simple Shell Scripts88
Let’s check the review table:
Table 3.5 – Copying and moving commands
Now
we know how to copy, delete, rename, and move files and directories, even full directory branches. Lets now take a look at a different way to work with them – links.
Symbolic and hard linksWe can have the same file in two places using
links.
There are two types of links Hard links: There will be two entries (or more) to the same file in the filesystem. The content will be written once to disk. Hard links for the same file cannot be created in two different filesystems. Hard links cannot be created for directories
Symbolic links: A symbolic link is created pointing to a file or directory in anyplace in the system.
Both are created using the ln (which stands for link) utility.
Let’s now create hard links:
Share with your friends: