Free Power Tools Brochure
Get Mark Minasi's
17-page guide today!



      

advertisement

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

February 13, 2006 04:13 PM

JSI Tip 10153. The Windows XP FSUTIL.EXE HARDLINK CREATE command.

Rating: (0)
Windows IT Pro
InstantDoc ID #85206

You can use the FSUTIL HARDLINK CREATE command to create hard links, an NTFS-based link to a given file which adds a directory entry for the hard link without duplicating the original file.

You can:

Create hard links that use the same file name as the original file but appear in different folders.

Create hard links that use different file names from the original file but appear in the same folder.

Create hard links that use different file names from the original file and appear in different folders.

Because a hard link is a directory entry for a file, an application can modify a file by using any of its hard links. Applications that use any other hard link can detect the changes. However, directory entries for hard links are updated only when a user accesses a file by using the hard link. For example, if a user opens and modifies a file by using its hard link, and the size of the original file changes, the hard link that is used to access the file also shows the new size.

NTFS updates the properties of a hard link only when a user accesses the original file by using the hard link, NOT every time a user makes a change to the original file.

Hard links do not have security descriptors; instead, the security descriptor belongs to the original file to which the hard link points. Thus, if you change the security descriptor of any hard link, you actually change the underlying file's security descriptor. All hard links that point to the file allow the newly specified access. You cannot give a file different security descriptors on a per-hard-link basis.

You cannot create a hard link on one volume that refers to a file on another volume.

To delete a file that has multiple hard links, you must delete the file and all its associated hard links.

Windows XP Help contains:

Fsutil: hardlink

A hard link is a directory entry for a file. Every file can be considered to have at least one hard link. On NTFS volumes, each file can have multiple hard links, and thus a single file can appear in many directories (or even in the same directory with different names). Because all of the links reference the same file, programs can open any of the links and modify the file. A file is deleted from the file system only after all links to it have been deleted. After you create a hard link, programs can use it like any other file name.

Syntax

fsutil hardlink create NewFileName ExistingFileName

Parameters

create
      Establishes an NTFS hard link between an existing file and a new file. An NTFS hard link is similar to a POSIX hard link.

NewFileName
      Specifies the file to which you want to create a hardlink.

ExistingFileName
      Specifies the file from which you want to create a hardlink.

NOTE:

How can I determine a drive size and free space in a Windows XP batch?

How can I display drive information from the Windows XP command-line?

A Windows XP Professional Fsutil Query does NOT work properly on a FAT or FAT32 partition?

How do I create a sparse file of a specific size in Windows XP and greater?

When you add files, via a copy or install, to a Windows 2000 SP4 partition with 512 MB of free space, or less, you receive 'There is not enough space on the disk'?

When you attempt to set the dirty bit on a mount point by using FsUtil.exe in Windows Server 2003, you receive 'Error: Access is denied'?

How can I set the shortname of a file or folder?



ARTICLE TOOLS

Add a Comment

There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

VB Script to enable user account

Do any of you guys have a VB script that could be used to enable a AD user account? We are setting up a "firecall" ID which will stay disabled until i...222-96219

advertisement

GOOGLE LINKS
SPONSORED LINKS
FEATURED LINKS

Podcasts

To successfully implement virtual desktops, IT administrators must carefully match user requirements to specific desktop technologies. Listen to this podcast to learn what you need to keep in mind when formulating your approach to desktop virtualization.

Downloads

PacketTrap IT is a comprehensive and affordable network management and application monitoring solution that solves problems associated with bandwidth, network and application performance, and connectivity. Gain insight into your network - try PacketTrapIT free for 21 days!

Web Seminars

Aside from its employees, data is an organization’s most important resource. Join Windows technical specialist and 11-time MVP John Savill to learn the best practices for managing data using features in Windows Server.
View this web seminar on demand!

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.