asked 54.1k views
1 vote
When you use the ln command, which of the following occurs?

1) a file is created that points to an existing file
2) a file is created that is a copy of an existing file
3) a file is moved from one location to another

asked
User Nakeia
by
7.9k points

1 Answer

3 votes

Final answer:

Using the ln command creates a new file that points to an existing file, either through a hard link or a symbolic link, without copying or moving the original file's contents.

Step-by-step explanation:

When you use the ln command on a Unix-like operating system, option 1 occurs: a file is created that points to an existing file. There are two types of links that can be created with the ln command: a hard link and a symbolic link. A hard link creates a new directory entry for a file, but does not actually copy the file's contents; instead, it points to the same inode as the original file. A symbolic link (created with ln -s) is like a shortcut; it is a separate file that points to the original file's location. Neither of these options creates a copy of the file's contents (option 2) nor do they move the file (option 3).

answered
User Pradeexsu
by
8.4k points

No related questions found