You are on page 1of 4

1

1
2
2
Hardlink vs Softlink
Original and link file will
have same inode no.
It cannot be created
across the partitions
If original file is deleted
then also the link file will
be accessible
Editing of original file will
replicate in the linked file
Size of Hardlink file is
same as original file.
Inode no. of the link file
will be different
It can be created across
the partitions
If original file is deleted
the link file will not be
accessible
Editing of original file will
replicate in the linked file
Size of Softlink file is
smaller than original file.
HardLink SoftLink
3
3
Links Commands
To configure hardlink
[root@comp1 ~]#ln <source file> <destination file>
To configure hardlink
[root@comp1 ~]#ln <source file> <destination file>
To configure softlink
[root@comp1 ~]#ln -s <source file> <destination file>
To configure softlink
[root@comp1 ~]#ln -s <source file> <destination file>
4
4
Change Owner / Group
To change owner/group of the file/directory
[root@comp1 ~]#chown <username:groupname> <file/directory>
To change owner/group of the file/directory
[root@comp1 ~]#chown <username:groupname> <file/directory>
To change group of the file/directory
[root@comp1 ~]#chgrp <groupname> <file/directory>
To change group of the file/directory
[root@comp1 ~]#chgrp <groupname> <file/directory>

You might also like