Useful shortcuts for vi editor

Thursday 7 April 2016

What are hard link and soft link in Linux?

Hard link; it may used for backup (replica) purpose. (seems to RAID 1)
e.g.
$ ln original_file.txt hd_file.txt
$ ln original_file2.txt /home/alper/hd_file2.txt

Soft link; it may used as shortcut like in Windows OS.
e.g.
$ ln -s original_file soft_file.txt
$ ln -s original_file /home/alper/soft_file2.txt

to list the links;
$ ls -l 
(l; list)
or 
$ ls -i
(i; inode number)
then find the files by same inode number
$ find . -inum <inode_number>

e.g.
$ find . -inum 10000