Bird
0
0

Which of the following is the correct syntax to create a hard link named 'hardlink' to a file 'file1'?

easy📝 Syntax Q3 of 15
Linux CLI - File and Directory Operations
Which of the following is the correct syntax to create a hard link named 'hardlink' to a file 'file1'?
Aln file1 hardlink
Bln -s file1 hardlink
Cln -h file1 hardlink
Dln --hard file1 hardlink
Step-by-Step Solution
Solution:
  1. Step 1: Recall hard link creation syntax

    Hard links are created with ln command without any options.
  2. Step 2: Identify the correct command

    ln file1 hardlink creates a hard link named 'hardlink' pointing to 'file1'.
  3. Final Answer:

    ln file1 hardlink -> Option A
  4. Quick Check:

    Hard link creation uses ln without '-s' = ln file1 hardlink [OK]
Quick Trick: No '-s' means hard link creation with ln [OK]
Common Mistakes:
MISTAKES
  • Using '-s' option creates symbolic link instead
  • Assuming '-h' or '--hard' options exist
  • Mixing up argument order

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes