Hard links and Symbolic links, What is that?

SYMBOLIC LINKS

Description of the symbolic link

HARD LINKS

Description of the hard link

Creating Soft Link or Symbolic Link

vagrant@vagrant-ubuntu-trusty-64:~/Holberton/test$ echo "Hello World" > file1.txtvagrant@vagrant-ubuntu-trusty-64:~/Holberton/test$ cat file1.txt
Hello World
vagrant@vagrant-ubuntu-trusty-64:~/Holberton/test$ ln -s file1.txt softlink.txtvagrant@vagrant-ubuntu-trusty-64:~/Holberton/test$ cat file1.txt
Hello World
vagrant@vagrant-ubuntu-trusty-64:~/Holberton/test$ cat softlink.txt
Hello World
vagrant@vagrant-ubuntu-trusty-64:~/Holberton/test$ ls -lia
total 12
268251 drwxrwxr-x 2 vagr vagr 4096 Sep 16 03:04 .
262157 drwxrwxr-x 5 vagr vagr 4096 Sep 16 02:56 ..
268919 -rw-rw-r-- 1 vagr vagr 12 Sep 16 03:03 file1.txt
268920 lrwxrwxrwx 1 vagr vagr 9 Sep 16 03:04 softlink.txt -> file1.txt
vagrant@vagrant-ubuntu-trusty-64:~/Holberton/test$ rm file1.txt
vagrant@vagrant-ubuntu-trusty-64:~/Holberton/test$ cat softlink.txt
cat: softlink.txt: No such file or directory

Creating Hard Links

Thanks for reading to me !!!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Carolina Hernandez Viveros

Carolina Hernandez Viveros

Software development student at Holberton School, lover of science, technology, cooking, music, cats and nature. Also geek