/Batch_hard_link

A shell script to create hard links to multiple files in a directory.

Primary LanguageShell

Create Hard link to multiple files

A shell script to create hard links to multiple files in a directory

Usage: sh main.sh $N $S $H

  • $N = No. of Files to Create Hardlinks
  • $S = Absolute Path to the Source File(s) Directory
  • $H = Absolute Path to create Hard link(s)

Note:

  • This script only creates hardlinks based on the first $N files that appear on ls $S
  • All the paths must be absolute paths terminating with a forward slash ( / )