0

Hai,

  • How can i create hard link for my directories ?
  • When i use to make link from /var to /home it shows error on "Invalid cross-device link", How can i over come it ?
Kumar
  • 823
  • 3
  • 20
  • 43

2 Answers2

3

You can only make symbolic links to directories.

From man 7 symlink:

       Hard links may not refer to directories (to pre‐
       vent the possibility of loops within the file system tree, which  would
       confuse  many  programs)  and  may not refer to files on different file
       systems (because i-node numbers are not unique across file systems).

To make backups, use rsync, dd or cpio (sometimes together with tar, bzip2, gzip or zip).

Dennis Williamson
  • 60,515
  • 14
  • 113
  • 148
0

By using the

ln

command.

Read this for more info.

LukeR
  • 3,086
  • 2
  • 29
  • 25