Skip to content

MaimoonaKhilji/Linux-Hard-Soft-Links

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Linux-Hard-Soft-Links

  1. Create a directory CS_link_test in /home
  2. Cd CS_link_test
  3. In CS_link_test folder create 3 files as File_A, File_B & File_C as:
  • echo Banana > File_A
  • echo Apple > File_B
  • echo Orange > File_C What happens when above commands are executed Output: three files are created with respective text.
  1. In CS_link_test create a new directory named as dirA
  2. Mv File_C into dirA
  3. See the inode numbers of individual files as
  • ls -i File_A
  • ls –i File_B
  • ls –i File_C
  1. Now create hardlink named as hl_FileA for File_A in and check the inode number for created hardlink. Is it same as inode number of File_A? if yes why?
  2. What is the file type and permissions of created hard link?
  3. Now create softlink for File_B named as sl_fileb and check the inode number for created softlink. Is it same as inode number of File_B? if yes why? If no why?
  4. What is the file type and permissions of created soft link?
  5. Append content of hl_FileA as “new Banana”. Does it affect content of File_A? If yes why ?
  6. Append content of sl_FileB as “new Apple”. Does it affect content of File_B? If yes why ?
  7. Unlink FileA from hl_FileA? what happened?
  8. Similarly delete softlink sl_File_B from File_b.

Releases

No releases published

Packages

No packages published