WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

FSUTIL, hardlink not working

 
Goto page 1, 2
   Home -> Windows Other -> File System RSS
Next:  it seems hardlinks don't work  
Author Message
Bertoldino

External


Since: Dec 13, 2007
Posts: 21



(Msg. 1) Posted: Fri Dec 14, 2007 8:15 am
Post subject: FSUTIL, hardlink not working
Archived from groups: microsoft>public>win2000>file_system (more info?)

hi,
either in win2000 or in winXP (both NTFS) i've tried FSUTIL hardlink create
newlink_file
source_file


but the new file seems to be only a mere copy and not an hardlink, so if i
modify the newlink_file the source_file remains the same

what's the matter? :-/

sorry for my bad english
Back to top
Login to vote
"Pegasus

External


Since: Oct 14, 2005
Posts: 2185



(Msg. 2) Posted: Fri Dec 14, 2007 8:58 am
Post subject: Re: FSUTIL, hardlink not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Bertoldino" <finchelabarca RemoveThis @efelidi.invalid> wrote in message
news:edu4bEiPIHA.1188@TK2MSFTNGP04.phx.gbl...
> hi,
> either in win2000 or in winXP (both NTFS) i've tried FSUTIL hardlink
> create
> newlink_file
> source_file
>
>
> but the new file seems to be only a mere copy and not an hardlink, so if i
> modify the newlink_file the source_file remains the same
>
> what's the matter? :-/
>
> sorry for my bad english
>
>

Google is your friend:
http://www.jsifaq.com/SF/Tips/Tip.aspx?id=10153
Back to top
Login to vote
Bertoldino

External


Since: Dec 13, 2007
Posts: 21



(Msg. 3) Posted: Fri Dec 14, 2007 2:26 pm
Post subject: Re: FSUTIL, hardlink not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Pegasus (MVP) wrote:

> Google is your friend:
> http://www.jsifaq.com/SF/Tips/Tip.aspx?id=10153

google is not frend as YOU are! Smile
i googled for weeks and i'v never seen that link Smile
i'm not used to post without searching in google, sorry you supposed it.


anyway,
my problem remains the same:

let me explain my "experiment" with the following sequence:
(the OS messages are in italian language, but you can simply repeat my
experiment and read your OS messages)

=== TOP ===

C:\test>md a b

C:\test>cd a

C:\test\a>copy con original_file.txt
This is the original file.
^Z
1 file copiati.

C:\test\a>cd ..\b



C:\test\b>fsutil hardlink create hardlinked.txt ..\a\original_file.txt
Collegamento hardware creato per C:\test\b\hardlinked.txt <<===>>
C:\test\a\orig

C:\test\b>edit hardlinked.txt

C:\test\b>type hardlinked.txt
This is the original file.
LINE ADDED USING HARDLINKED.TXT


C:\test\b>cd..\a

C:\test\a>type original_file.txt
This is the original file.

=== BOTTOM ===

as you can see the original file was not updated.
this doesn't seem an hardlink to me.
i've not controlled sizes, but content.

what was wrong? :-/

Thanks for your time and kind attention Smile
Back to top
Login to vote
"Pegasus

External


Since: Oct 14, 2005
Posts: 2185



(Msg. 4) Posted: Fri Dec 14, 2007 8:07 pm
Post subject: Re: FSUTIL, hardlink not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Bertoldino" <finchelabarca RemoveThis @efelidi.invalid> wrote in message
news:emZnvTlPIHA.5976@TK2MSFTNGP05.phx.gbl...
> Pegasus (MVP) wrote:
>
>> Google is your friend:
>> http://www.jsifaq.com/SF/Tips/Tip.aspx?id=10153
>
> google is not frend as YOU are! Smile
> i googled for weeks and i'v never seen that link Smile
> i'm not used to post without searching in google, sorry you supposed it.
>
>
> anyway,
> my problem remains the same:
>
> let me explain my "experiment" with the following sequence:
> (the OS messages are in italian language, but you can simply repeat my
> experiment and read your OS messages)
>
> === TOP ===
>
> C:\test>md a b
>
> C:\test>cd a
>
> C:\test\a>copy con original_file.txt
> This is the original file.
> ^Z
> 1 file copiati.
>
> C:\test\a>cd ..\b
>
>
>
> C:\test\b>fsutil hardlink create hardlinked.txt ..\a\original_file.txt
> Collegamento hardware creato per C:\test\b\hardlinked.txt <<===>>
> C:\test\a\orig
>
> C:\test\b>edit hardlinked.txt
>
> C:\test\b>type hardlinked.txt
> This is the original file.
> LINE ADDED USING HARDLINKED.TXT
>
>
> C:\test\b>cd..\a
>
> C:\test\a>type original_file.txt
> This is the original file.
>
> === BOTTOM ===
>
> as you can see the original file was not updated.
> this doesn't seem an hardlink to me.
> i've not controlled sizes, but content.
>
> what was wrong? :-/
>
> Thanks for your time and kind attention Smile
>
>

Some of your commands are back to front. Try this little batch file:
@echo off
dir c:\ > c:\original.txt
fsutil hardlink create c:\linked.txt c:\original.txt
echo Viva l'Italia! >> c:\linked.txt
type c:\original.txt
Back to top
Login to vote
Bertoldino

External


Since: Dec 13, 2007
Posts: 21



(Msg. 5) Posted: Mon Dec 17, 2007 10:48 am
Post subject: Re: FSUTIL, hardlink not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Pegasus (MVP) wrote:

> Some of your commands are back to front. Try this little batch file:
> @echo off
> dir c:\ > c:\original.txt
> fsutil hardlink create c:\linked.txt c:\original.txt
> echo Viva l'Italia! >> c:\linked.txt
> type c:\original.txt

gosh Sad
i've tried, they work perfectly and the problem is that they seem to be
identical to my instruction sequence (except for the command itself, you
used pipe commands with dir, i used direct input)

Sad

please help me understand ...
the sequence is:

create original file / test content

create hard link to the original file
write to the hard link
test content of the original file ; if content is updated, hardlink is
working, else ... i'm not able to use FSUTUL ! Wink

sorry if i'm a little blockhead ... but i'm going on reading and reading
your example and mine... and i can't see where is the problem Sad
Back to top
Login to vote
"Pegasus

External


Since: Oct 14, 2005
Posts: 2185



(Msg. 6) Posted: Mon Dec 17, 2007 12:17 pm
Post subject: Re: FSUTIL, hardlink not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Bertoldino" <finchelabarca RemoveThis @efelidi.invalid> wrote in message
news:ehZN$HJQIHA.4712@TK2MSFTNGP04.phx.gbl...
> Pegasus (MVP) wrote:
>
>> Some of your commands are back to front. Try this little batch file:
>> @echo off
>> dir c:\ > c:\original.txt
>> fsutil hardlink create c:\linked.txt c:\original.txt
>> echo Viva l'Italia! >> c:\linked.txt
>> type c:\original.txt
>
> gosh Sad
> i've tried, they work perfectly and the problem is that they seem to be
> identical to my instruction sequence (except for the command itself, you
> used pipe commands with dir, i used direct input)
>
> Sad
>
> please help me understand ...
> the sequence is:
>
> create original file / test content
>
> create hard link to the original file
> write to the hard link
> test content of the original file ; if content is updated, hardlink is
> working, else ... i'm not able to use FSUTUL ! Wink
>
> sorry if i'm a little blockhead ... but i'm going on reading and reading
> your example and mine... and i can't see where is the problem Sad

Writing pseudo-code is fine when explaining a general
principle but is of no use when it comes to debugging.
I created a batch file for you that shows how the hardlink
concept works. You now need to create your own batch
file to demonstrate how it does NOT work when you do it.
Back to top
Login to vote
Bertoldino

External


Since: Dec 13, 2007
Posts: 21



(Msg. 7) Posted: Mon Dec 17, 2007 1:51 pm
Post subject: Re: FSUTIL, hardlink not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> Writing pseudo-code is fine when explaining a general
> principle but is of no use when it comes to debugging.
> I created a batch file for you that shows how the hardlink
> concept works. You now need to create your own batch
> file to demonstrate how it does NOT work when you do it.

yes,
i recreated perfectly a batch file with your concept in mind and it worked
fine:

==my sample: ==

time /T >original.txt
fsutil hardlink create hardlink.txt original.txt
date /T >>hardlink.txt
md sample
move hardlink.txt .\sample
type .\sample\hardlink.txt

== end of my sample ==

it works.
but when i do the following in interactive mode (by hand), it doesn't work:

copy con original.txt
{typing something, then ctrl-z, return}
fsutil hardlink create linked.txt original.txt
edit linked.txt
{modify somewhat}
type original.txt

the resulting file is not modified Sad
and the same thing happens if i use notepad (not only "edit")
Back to top
Login to vote
"Pegasus

External


Since: Oct 14, 2005
Posts: 2185



(Msg. 8) Posted: Mon Dec 17, 2007 2:23 pm
Post subject: Re: FSUTIL, hardlink not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Bertoldino" <finchelabarca.TakeThisOut@efelidi.invalid> wrote in message
news:OghfQuKQIHA.2208@TK2MSFTNGP06.phx.gbl...
>> Writing pseudo-code is fine when explaining a general
>> principle but is of no use when it comes to debugging.
>> I created a batch file for you that shows how the hardlink
>> concept works. You now need to create your own batch
>> file to demonstrate how it does NOT work when you do it.
>
> yes,
> i recreated perfectly a batch file with your concept in mind and it worked
> fine:
>
> ==my sample: ==
>
> time /T >original.txt
> fsutil hardlink create hardlink.txt original.txt
> date /T >>hardlink.txt
> md sample
> move hardlink.txt .\sample
> type .\sample\hardlink.txt
>
> == end of my sample ==
>
> it works.
> but when i do the following in interactive mode (by hand), it doesn't
> work:
>
> copy con original.txt
> {typing something, then ctrl-z, return}
> fsutil hardlink create linked.txt original.txt
> edit linked.txt
> {modify somewhat}
> type original.txt
>
> the resulting file is not modified Sad
> and the same thing happens if i use notepad (not only "edit")

You are punishing yourself by using a DOS program (edit)
on an NTFS volume with an advanced NTFS command
(fsutil). When you use edit then it destroys part of the link
and you have to rebuild it. Stop using edit - there is no reason
at all for having it!
Back to top
Login to vote
Display posts from previous:   
       Home -> Windows Other -> File System All times are: Eastern Time (US & Canada) (change)
Goto page 1, 2
Page 1 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
  Windows Other
 Office
 Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support