Use the same file link for both Linux and Windows

Clash Royale CLAN TAG#URR8PPP
Is it even possible to do so? I mean, can I create a link on Linux and than make this link valid also on Windows?
Use-case
I have the folder /media/Data/DownloadedMusic on a NTFS partition. I also have the folder /media/Data/Music on the same partition. How can I create a link to DownloadedMusic inside Music so that the link can be accessible both from a Linux system and a Windows system?
windows hard-link
add a comment |
Is it even possible to do so? I mean, can I create a link on Linux and than make this link valid also on Windows?
Use-case
I have the folder /media/Data/DownloadedMusic on a NTFS partition. I also have the folder /media/Data/Music on the same partition. How can I create a link to DownloadedMusic inside Music so that the link can be accessible both from a Linux system and a Windows system?
windows hard-link
This is dependent on the filesystem, but yes this can be done with hardlinks if you use ntfs as filesystem.
– Anthon
Oct 25 '14 at 8:24
added further infos in the OQ
– tigerjack89
Oct 25 '14 at 9:00
add a comment |
Is it even possible to do so? I mean, can I create a link on Linux and than make this link valid also on Windows?
Use-case
I have the folder /media/Data/DownloadedMusic on a NTFS partition. I also have the folder /media/Data/Music on the same partition. How can I create a link to DownloadedMusic inside Music so that the link can be accessible both from a Linux system and a Windows system?
windows hard-link
Is it even possible to do so? I mean, can I create a link on Linux and than make this link valid also on Windows?
Use-case
I have the folder /media/Data/DownloadedMusic on a NTFS partition. I also have the folder /media/Data/Music on the same partition. How can I create a link to DownloadedMusic inside Music so that the link can be accessible both from a Linux system and a Windows system?
windows hard-link
windows hard-link
edited Feb 10 at 19:09
Rui F Ribeiro
41.1k1479137
41.1k1479137
asked Oct 25 '14 at 7:35
tigerjack89tigerjack89
17718
17718
This is dependent on the filesystem, but yes this can be done with hardlinks if you use ntfs as filesystem.
– Anthon
Oct 25 '14 at 8:24
added further infos in the OQ
– tigerjack89
Oct 25 '14 at 9:00
add a comment |
This is dependent on the filesystem, but yes this can be done with hardlinks if you use ntfs as filesystem.
– Anthon
Oct 25 '14 at 8:24
added further infos in the OQ
– tigerjack89
Oct 25 '14 at 9:00
This is dependent on the filesystem, but yes this can be done with hardlinks if you use ntfs as filesystem.
– Anthon
Oct 25 '14 at 8:24
This is dependent on the filesystem, but yes this can be done with hardlinks if you use ntfs as filesystem.
– Anthon
Oct 25 '14 at 8:24
added further infos in the OQ
– tigerjack89
Oct 25 '14 at 9:00
added further infos in the OQ
– tigerjack89
Oct 25 '14 at 9:00
add a comment |
2 Answers
2
active
oldest
votes
There isn't a single command/method that I've seen that will give you this easily, but rather you'll have to create this linkage yourself using a variety of components.
For starters, on Linux you can have the system automount the NTFS partition via the /etc/fstab file anytime that it boots.
/dev/sda2 /mnt/somedir ntfs-3g permissions,locale=en_US.utf8 1 2
Then within the NTFS partition, while it's booted to Windows, you could create a junction point or symbolic link inside the directory C:DataMusic to C:DataDownloadedMusic.
I have not tried this before but it looks like you can also do this from the Linux side using the setattr command to create a junction point.
# Display the reparse data of the file source-file
$ getfattr -h -e hex -n system.ntfs_reparse_data source-file
# Copy the reparse data of the file source-file
# to the file target-file
$ REPARSE=`getfattr -h -e hex -n system.ntfs_reparse_data source-file |
grep '=' | sed -e 's/^.*=//'`
$ setfattr -h -v $REPARSE -n system.ntfs_reparse_data target-file
References
- Junction Points and Symbolic Links
- Create NTFS symbolic links from within Linux
add a comment |
Windows can't read the Linux filesystem. However Linux can read the Windows filesystem. So if you have your /media/Data/Music on a Windows file system you can have access to that space (the same files) on both Windows and Linux. However, if it's on a Linux filesystem you can only have access to it from Linux.
Making a Windows Filesystem (NTFS) would be the absolute answer. However, you loose functionality with the windows FS over the linux FS.
You could solve this by making a Linux fileserver and placing your music data on the server. Then you can have a the same link from Linux (via samba) and Windows (via it's native networking).
A linux fileserver doesn't require a lot of PC power. You can take an old PC that is ready for the dump, put the minimum linux configuration and a hard drive in it and have a very convenient drive access.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f164155%2fuse-the-same-file-link-for-both-linux-and-windows%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
There isn't a single command/method that I've seen that will give you this easily, but rather you'll have to create this linkage yourself using a variety of components.
For starters, on Linux you can have the system automount the NTFS partition via the /etc/fstab file anytime that it boots.
/dev/sda2 /mnt/somedir ntfs-3g permissions,locale=en_US.utf8 1 2
Then within the NTFS partition, while it's booted to Windows, you could create a junction point or symbolic link inside the directory C:DataMusic to C:DataDownloadedMusic.
I have not tried this before but it looks like you can also do this from the Linux side using the setattr command to create a junction point.
# Display the reparse data of the file source-file
$ getfattr -h -e hex -n system.ntfs_reparse_data source-file
# Copy the reparse data of the file source-file
# to the file target-file
$ REPARSE=`getfattr -h -e hex -n system.ntfs_reparse_data source-file |
grep '=' | sed -e 's/^.*=//'`
$ setfattr -h -v $REPARSE -n system.ntfs_reparse_data target-file
References
- Junction Points and Symbolic Links
- Create NTFS symbolic links from within Linux
add a comment |
There isn't a single command/method that I've seen that will give you this easily, but rather you'll have to create this linkage yourself using a variety of components.
For starters, on Linux you can have the system automount the NTFS partition via the /etc/fstab file anytime that it boots.
/dev/sda2 /mnt/somedir ntfs-3g permissions,locale=en_US.utf8 1 2
Then within the NTFS partition, while it's booted to Windows, you could create a junction point or symbolic link inside the directory C:DataMusic to C:DataDownloadedMusic.
I have not tried this before but it looks like you can also do this from the Linux side using the setattr command to create a junction point.
# Display the reparse data of the file source-file
$ getfattr -h -e hex -n system.ntfs_reparse_data source-file
# Copy the reparse data of the file source-file
# to the file target-file
$ REPARSE=`getfattr -h -e hex -n system.ntfs_reparse_data source-file |
grep '=' | sed -e 's/^.*=//'`
$ setfattr -h -v $REPARSE -n system.ntfs_reparse_data target-file
References
- Junction Points and Symbolic Links
- Create NTFS symbolic links from within Linux
add a comment |
There isn't a single command/method that I've seen that will give you this easily, but rather you'll have to create this linkage yourself using a variety of components.
For starters, on Linux you can have the system automount the NTFS partition via the /etc/fstab file anytime that it boots.
/dev/sda2 /mnt/somedir ntfs-3g permissions,locale=en_US.utf8 1 2
Then within the NTFS partition, while it's booted to Windows, you could create a junction point or symbolic link inside the directory C:DataMusic to C:DataDownloadedMusic.
I have not tried this before but it looks like you can also do this from the Linux side using the setattr command to create a junction point.
# Display the reparse data of the file source-file
$ getfattr -h -e hex -n system.ntfs_reparse_data source-file
# Copy the reparse data of the file source-file
# to the file target-file
$ REPARSE=`getfattr -h -e hex -n system.ntfs_reparse_data source-file |
grep '=' | sed -e 's/^.*=//'`
$ setfattr -h -v $REPARSE -n system.ntfs_reparse_data target-file
References
- Junction Points and Symbolic Links
- Create NTFS symbolic links from within Linux
There isn't a single command/method that I've seen that will give you this easily, but rather you'll have to create this linkage yourself using a variety of components.
For starters, on Linux you can have the system automount the NTFS partition via the /etc/fstab file anytime that it boots.
/dev/sda2 /mnt/somedir ntfs-3g permissions,locale=en_US.utf8 1 2
Then within the NTFS partition, while it's booted to Windows, you could create a junction point or symbolic link inside the directory C:DataMusic to C:DataDownloadedMusic.
I have not tried this before but it looks like you can also do this from the Linux side using the setattr command to create a junction point.
# Display the reparse data of the file source-file
$ getfattr -h -e hex -n system.ntfs_reparse_data source-file
# Copy the reparse data of the file source-file
# to the file target-file
$ REPARSE=`getfattr -h -e hex -n system.ntfs_reparse_data source-file |
grep '=' | sed -e 's/^.*=//'`
$ setfattr -h -v $REPARSE -n system.ntfs_reparse_data target-file
References
- Junction Points and Symbolic Links
- Create NTFS symbolic links from within Linux
edited Apr 13 '17 at 12:13
Community♦
1
1
answered Oct 25 '14 at 13:50
slm♦slm
253k70534685
253k70534685
add a comment |
add a comment |
Windows can't read the Linux filesystem. However Linux can read the Windows filesystem. So if you have your /media/Data/Music on a Windows file system you can have access to that space (the same files) on both Windows and Linux. However, if it's on a Linux filesystem you can only have access to it from Linux.
Making a Windows Filesystem (NTFS) would be the absolute answer. However, you loose functionality with the windows FS over the linux FS.
You could solve this by making a Linux fileserver and placing your music data on the server. Then you can have a the same link from Linux (via samba) and Windows (via it's native networking).
A linux fileserver doesn't require a lot of PC power. You can take an old PC that is ready for the dump, put the minimum linux configuration and a hard drive in it and have a very convenient drive access.
add a comment |
Windows can't read the Linux filesystem. However Linux can read the Windows filesystem. So if you have your /media/Data/Music on a Windows file system you can have access to that space (the same files) on both Windows and Linux. However, if it's on a Linux filesystem you can only have access to it from Linux.
Making a Windows Filesystem (NTFS) would be the absolute answer. However, you loose functionality with the windows FS over the linux FS.
You could solve this by making a Linux fileserver and placing your music data on the server. Then you can have a the same link from Linux (via samba) and Windows (via it's native networking).
A linux fileserver doesn't require a lot of PC power. You can take an old PC that is ready for the dump, put the minimum linux configuration and a hard drive in it and have a very convenient drive access.
add a comment |
Windows can't read the Linux filesystem. However Linux can read the Windows filesystem. So if you have your /media/Data/Music on a Windows file system you can have access to that space (the same files) on both Windows and Linux. However, if it's on a Linux filesystem you can only have access to it from Linux.
Making a Windows Filesystem (NTFS) would be the absolute answer. However, you loose functionality with the windows FS over the linux FS.
You could solve this by making a Linux fileserver and placing your music data on the server. Then you can have a the same link from Linux (via samba) and Windows (via it's native networking).
A linux fileserver doesn't require a lot of PC power. You can take an old PC that is ready for the dump, put the minimum linux configuration and a hard drive in it and have a very convenient drive access.
Windows can't read the Linux filesystem. However Linux can read the Windows filesystem. So if you have your /media/Data/Music on a Windows file system you can have access to that space (the same files) on both Windows and Linux. However, if it's on a Linux filesystem you can only have access to it from Linux.
Making a Windows Filesystem (NTFS) would be the absolute answer. However, you loose functionality with the windows FS over the linux FS.
You could solve this by making a Linux fileserver and placing your music data on the server. Then you can have a the same link from Linux (via samba) and Windows (via it's native networking).
A linux fileserver doesn't require a lot of PC power. You can take an old PC that is ready for the dump, put the minimum linux configuration and a hard drive in it and have a very convenient drive access.
answered Oct 25 '14 at 14:50
L. D. JamesL. D. James
889514
889514
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f164155%2fuse-the-same-file-link-for-both-linux-and-windows%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
This is dependent on the filesystem, but yes this can be done with hardlinks if you use ntfs as filesystem.
– Anthon
Oct 25 '14 at 8:24
added further infos in the OQ
– tigerjack89
Oct 25 '14 at 9:00