Thursday, September 16, 2010

link in perl

create a new file linked to oldfile. function creates a hard link if you want symbolic link then use symlink function.
returns 1 on success and 0 on failure. NewFile should not be present else will throw an error. This feature is similar to copying and renaming the file.

link OLDFILE, NEWFILE;
link "file1.txt", "file3.txt";

No comments:

Post a Comment