FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Thu May 13, 2021 21:17



Post new topic Reply to topic  [ 3 posts ] 
usage of directory junctions 
Author Message

Joined: Thu Sep 09, 2010 20:30
Posts: 2
Post usage of directory junctions
Hi Forum!

In the ordering of files I have links to directories (several links to the same directory). Sometimes I even need to move directories to new locations, or to delete the originally created one keeping the linked copies.

Symlinks are no good for this purpose as they become dead when I move or delete the original directory.
Hard links seem no good either because although hard linking directories is theoretically possible, this feature seems to be disabled in Linux systems.

Do NTFS directory junctions point to the new location when the original directory is moved?
Do they keep the content of the directory when the originally created directory is deleted?
Is it possible to use directory junctions with Linux and NTFS-3G?

A workaround with an additional layer of symlinks has been suggested on an other forum, but they seem not to know much about NTFS-3G (http://www.linuxforums.org/forum/linux- ... orted.html).

Thanks

-- hardlink


Thu Sep 09, 2010 20:49
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: usage of directory junctions
Hi,

Quote:
Do NTFS directory junctions point to the new location when the original directory is moved?

No.
Quote:
Do they keep the content of the directory when the originally created directory is deleted?

No. A directory junction is just a pointer to another directory. When the target is deleted, the junction is dead.
Quote:
Is it possible to use directory junctions with Linux and NTFS-3G?

Yes. See http://www.tuxera.com/community/ntfs-3g ... lic-links/ When the junction and the target are on different devices, you have to define the target Windows device letter, as a target created by Windows is recorded with Windows syntax.

The ntfs concept for doing what you want is the object_id. An object_id is a world-unique reference to a file, which is used by Windows for shortcuts. When a target is moved (even across a network), and the shortcut is selected, a search is done to locate the target on the mounted devices.

The object_id can be queried and set from Linux (see http://www.tuxera.com/community/ntfs-3g ... #objectids), but locating a file from its object_id requires system features above the file system...

Regards

Jean-Pierre


Thu Sep 09, 2010 21:22
Profile

Joined: Thu Sep 09, 2010 20:30
Posts: 2
Post Re: usage of directory junctions
Thank you very much, Jean-Pierre.
The object_id is a fascinating feature I did not know about, however the workaround with the extra symlink for each directory seems much easier. -- hardlink


Thu Sep 09, 2010 21:33
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Original forum style by Vjacheslav Trushkin.