Hi, I apparently was asleep at the wheel using scp, and accidentally copied a file onto itself. Scp generated an Input/Output error and did not perform the copy. However, now the file is corrupt. Is this a but? Is there anyway to fix the file I messed up? Thanks, Don Gathman 208.396.6675
What options did you use with scp and what was the exact error message? Generally, at least in my experience, scp will not copy over a file when the 'source' and 'destination' are identical when doing a local copy: $ scp test test cp: test and test are identical when doing a remote copy, you will overwrite the remote file but that is a different situation and should not corrupt the file. Matt Studley American Mathematical Society UNIX Sys Admin "Quantum Mechanics - mjs at ams.org The dreams that stuff is made of" On Mon, 6 May 2002, GATHMAN,DON (HP-Boise,ex1) wrote:> Hi, > > I apparently was asleep at the wheel using scp, and accidentally copied a > file onto itself. Scp generated an Input/Output error and did not perform > the copy. However, now the file is corrupt. Is this a but? Is there anyway > to fix the file I messed up? > > Thanks, > Don Gathman > 208.396.6675 > _______________________________________________ > openssh-unix-dev at mindrot.org mailing list > http://www.mindrot.org/mailman/listinfo/openssh-unix-dev >
if /somedir/fileA on hostA == /path/to/fileB on hostB because of NFS/AFS/DFS/whatever then "hostA/somedir/: scp fileA hostB:/path/to/fileB" will corrupt the file fi --> -----Original Message----- > From: Matt Studley [mailto:mjs at ams.org] > Sent: Monday, May 06, 2002 1:14 PM > To: GATHMAN,DON (HP-Boise,ex1) > Cc: 'openssh-unix-dev at mindrot.org' > Subject: Re: SCP file corruptions > > > What options did you use with scp and what was the exact > error message? > Generally, at least in my experience, scp will not copy over > a file when > the 'source' and 'destination' are identical when doing a local copy: > > $ scp test test > cp: test and test are identical > > when doing a remote copy, you will overwrite the remote file > but that is > a different situation and should not corrupt the file. > > > Matt Studley > American Mathematical Society > UNIX Sys Admin "Quantum Mechanics - > mjs at ams.org The dreams that stuff > is made of" > > On Mon, 6 May 2002, GATHMAN,DON (HP-Boise,ex1) wrote: > > > Hi, > > > > I apparently was asleep at the wheel using scp, and > accidentally copied a > > file onto itself. Scp generated an Input/Output error and > did not perform > > the copy. However, now the file is corrupt. Is this a > but? Is there anyway > > to fix the file I messed up? > > > > Thanks, > > Don Gathman > > 208.396.6675 > > _______________________________________________ > > openssh-unix-dev at mindrot.org mailing list > > http://www.mindrot.org/mailman/listinfo/openssh-unix-dev > > > > _______________________________________________ > openssh-unix-dev at mindrot.org mailing list > http://www.mindrot.org/mailman/listinfo/openssh-unix-dev >Visit our website at http://www.ubswarburg.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.
It was an IIRC. There's been plenty on this in the list. It's possible that this applies only to SCP with SSHv1. Nico --> -----Original Message----- > From: Matt Studley [mailto:mjs at ams.org] > Sent: Monday, May 06, 2002 1:40 PM > To: Williams, Nicolas > Cc: don_gathman at hp.com; openssh-unix-dev at mindrot.org > Subject: RE: SCP file corruptions > > > > I just tried this with an AFS mounted partition and it worked > as expected > (normal remote copy). Is your statement only true if the file is a > binary? I did try it with a plain text file. > > Matt Studley > American Mathematical Society > UNIX Sys Admin "Quantum Mechanics - > mjs at ams.org The dreams that stuff > is made of" > > On Mon, 6 May 2002 Nicolas.Williams at ubsw.com wrote: > > > > > if /somedir/fileA on hostA == /path/to/fileB on hostB > because of NFS/AFS/DFS/whatever > > then > > "hostA/somedir/: scp fileA hostB:/path/to/fileB" will > corrupt the file > > fi > > > > > > -- > > > > > -----Original Message----- > > > From: Matt Studley [mailto:mjs at ams.org] > > > Sent: Monday, May 06, 2002 1:14 PM > > > To: GATHMAN,DON (HP-Boise,ex1) > > > Cc: 'openssh-unix-dev at mindrot.org' > > > Subject: Re: SCP file corruptions > > > > > > > > > What options did you use with scp and what was the exact > > > error message? > > > Generally, at least in my experience, scp will not copy over > > > a file when > > > the 'source' and 'destination' are identical when doing a > local copy: > > > > > > $ scp test test > > > cp: test and test are identical > > > > > > when doing a remote copy, you will overwrite the remote file > > > but that is > > > a different situation and should not corrupt the file. > > > > > > > > > Matt Studley > > > American Mathematical Society > > > UNIX Sys Admin "Quantum Mechanics - > > > mjs at ams.org The dreams that stuff > > > is made of" > > > > > > On Mon, 6 May 2002, GATHMAN,DON (HP-Boise,ex1) wrote: > > > > > > > Hi, > > > > > > > > I apparently was asleep at the wheel using scp, and > > > accidentally copied a > > > > file onto itself. Scp generated an Input/Output error and > > > did not perform > > > > the copy. However, now the file is corrupt. Is this a > > > but? Is there anyway > > > > to fix the file I messed up? > > > > > > > > Thanks, > > > > Don Gathman > > > > 208.396.6675 > > > > _______________________________________________ > > > > openssh-unix-dev at mindrot.org mailing list > > > > http://www.mindrot.org/mailman/listinfo/openssh-unix-dev > > > > > > > > > > _______________________________________________ > > > openssh-unix-dev at mindrot.org mailing list > > > http://www.mindrot.org/mailman/listinfo/openssh-unix-dev > > > > > > > Visit our website at http://www.ubswarburg.com > > > > This message contains confidential information and is intended only > > for the individual named. If you are not the named addressee you > > should not disseminate, distribute or copy this e-mail. Please > > notify the sender immediately by e-mail if you have received this > > e-mail by mistake and delete this e-mail from your system. > > > > E-mail transmission cannot be guaranteed to be secure or error-free > > as information could be intercepted, corrupted, lost, destroyed, > > arrive late or incomplete, or contain viruses. The sender therefore > > does not accept liability for any errors or omissions in > the contents > > of this message which arise as a result of e-mail transmission. If > > verification is required please request a hard-copy version. This > > message is provided for informational purposes and should not be > > construed as a solicitation or offer to buy or sell any > securities or > > related financial instruments. > > > > _______________________________________________ > > openssh-unix-dev at mindrot.org mailing list > > http://www.mindrot.org/mailman/listinfo/openssh-unix-dev > > > >Visit our website at http://www.ubswarburg.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.
Thanks for the replies.. My use of scp was just as Nico described, and I'm using SSHv1. I guess I'm without a paddle on the file I corrupted. I'll chalk it up to a Monday morning lesson and see if I can update SSH on the machines I'm working with.. Thanks, Don -----Original Message----- From: Nicolas.Williams at ubsw.com [mailto:Nicolas.Williams at ubsw.com] Sent: Monday, May 06, 2002 11:43 AM To: mjs at ams.org Cc: don_gathman at hp.com; openssh-unix-dev at mindrot.org Subject: RE: SCP file corruptions It was an IIRC. There's been plenty on this in the list. It's possible that this applies only to SCP with SSHv1. Nico --> -----Original Message----- > From: Matt Studley [mailto:mjs at ams.org] > Sent: Monday, May 06, 2002 1:40 PM > To: Williams, Nicolas > Cc: don_gathman at hp.com; openssh-unix-dev at mindrot.org > Subject: RE: SCP file corruptions > > > > I just tried this with an AFS mounted partition and it worked > as expected > (normal remote copy). Is your statement only true if the file is a > binary? I did try it with a plain text file. > > Matt Studley > American Mathematical Society > UNIX Sys Admin "Quantum Mechanics - > mjs at ams.org The dreams that stuff > is made of" > > On Mon, 6 May 2002 Nicolas.Williams at ubsw.com wrote: > > > > > if /somedir/fileA on hostA == /path/to/fileB on hostB > because of NFS/AFS/DFS/whatever > > then > > "hostA/somedir/: scp fileA hostB:/path/to/fileB" will > corrupt the file > > fi > > > > > > -- > > > > > -----Original Message----- > > > From: Matt Studley [mailto:mjs at ams.org] > > > Sent: Monday, May 06, 2002 1:14 PM > > > To: GATHMAN,DON (HP-Boise,ex1) > > > Cc: 'openssh-unix-dev at mindrot.org' > > > Subject: Re: SCP file corruptions > > > > > > > > > What options did you use with scp and what was the exact > > > error message? > > > Generally, at least in my experience, scp will not copy over > > > a file when > > > the 'source' and 'destination' are identical when doing a > local copy: > > > > > > $ scp test test > > > cp: test and test are identical > > > > > > when doing a remote copy, you will overwrite the remote file > > > but that is > > > a different situation and should not corrupt the file. > > > > > > > > > Matt Studley > > > American Mathematical Society > > > UNIX Sys Admin "Quantum Mechanics - > > > mjs at ams.org The dreams that stuff > > > is made of" > > > > > > On Mon, 6 May 2002, GATHMAN,DON (HP-Boise,ex1) wrote: > > > > > > > Hi, > > > > > > > > I apparently was asleep at the wheel using scp, and > > > accidentally copied a > > > > file onto itself. Scp generated an Input/Output error and > > > did not perform > > > > the copy. However, now the file is corrupt. Is this a > > > but? Is there anyway > > > > to fix the file I messed up? > > > > > > > > Thanks, > > > > Don Gathman > > > > 208.396.6675 > > > > _______________________________________________ > > > > openssh-unix-dev at mindrot.org mailing list > > > > http://www.mindrot.org/mailman/listinfo/openssh-unix-dev > > > > > > > > > > _______________________________________________ > > > openssh-unix-dev at mindrot.org mailing list > > > http://www.mindrot.org/mailman/listinfo/openssh-unix-dev > > > > > > > Visit our website at http://www.ubswarburg.com > > > > This message contains confidential information and is intended only > > for the individual named. If you are not the named addressee you > > should not disseminate, distribute or copy this e-mail. Please > > notify the sender immediately by e-mail if you have received this > > e-mail by mistake and delete this e-mail from your system. > > > > E-mail transmission cannot be guaranteed to be secure or error-free > > as information could be intercepted, corrupted, lost, destroyed, > > arrive late or incomplete, or contain viruses. The sender therefore > > does not accept liability for any errors or omissions in > the contents > > of this message which arise as a result of e-mail transmission. If > > verification is required please request a hard-copy version. This > > message is provided for informational purposes and should not be > > construed as a solicitation or offer to buy or sell any > securities or > > related financial instruments. > > > > _______________________________________________ > > openssh-unix-dev at mindrot.org mailing list > > http://www.mindrot.org/mailman/listinfo/openssh-unix-dev > > > >Visit our website at http://www.ubswarburg.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.
FYI, Turns out I was using package openssh-2.9p2-11.7... -----Original Message----- From: GATHMAN,DON (HP-Boise,ex1) Sent: Monday, May 06, 2002 12:55 PM To: 'Nicolas.Williams at ubsw.com'; mjs at ams.org Cc: GATHMAN,DON (HP-Boise,ex1); openssh-unix-dev at mindrot.org Subject: RE: SCP file corruptions Thanks for the replies.. My use of scp was just as Nico described, and I'm using SSHv1. I guess I'm without a paddle on the file I corrupted. I'll chalk it up to a Monday morning lesson and see if I can update SSH on the machines I'm working with.. Thanks, Don -----Original Message----- From: Nicolas.Williams at ubsw.com [mailto:Nicolas.Williams at ubsw.com] Sent: Monday, May 06, 2002 11:43 AM To: mjs at ams.org Cc: don_gathman at hp.com; openssh-unix-dev at mindrot.org Subject: RE: SCP file corruptions It was an IIRC. There's been plenty on this in the list. It's possible that this applies only to SCP with SSHv1. Nico --> -----Original Message----- > From: Matt Studley [mailto:mjs at ams.org] > Sent: Monday, May 06, 2002 1:40 PM > To: Williams, Nicolas > Cc: don_gathman at hp.com; openssh-unix-dev at mindrot.org > Subject: RE: SCP file corruptions > > > > I just tried this with an AFS mounted partition and it worked > as expected > (normal remote copy). Is your statement only true if the file is a > binary? I did try it with a plain text file. > > Matt Studley > American Mathematical Society > UNIX Sys Admin "Quantum Mechanics - > mjs at ams.org The dreams that stuff > is made of" > > On Mon, 6 May 2002 Nicolas.Williams at ubsw.com wrote: > > > > > if /somedir/fileA on hostA == /path/to/fileB on hostB > because of NFS/AFS/DFS/whatever > > then > > "hostA/somedir/: scp fileA hostB:/path/to/fileB" will > corrupt the file > > fi > > > > > > -- > > > > > -----Original Message----- > > > From: Matt Studley [mailto:mjs at ams.org] > > > Sent: Monday, May 06, 2002 1:14 PM > > > To: GATHMAN,DON (HP-Boise,ex1) > > > Cc: 'openssh-unix-dev at mindrot.org' > > > Subject: Re: SCP file corruptions > > > > > > > > > What options did you use with scp and what was the exact > > > error message? > > > Generally, at least in my experience, scp will not copy over > > > a file when > > > the 'source' and 'destination' are identical when doing a > local copy: > > > > > > $ scp test test > > > cp: test and test are identical > > > > > > when doing a remote copy, you will overwrite the remote file > > > but that is > > > a different situation and should not corrupt the file. > > > > > > > > > Matt Studley > > > American Mathematical Society > > > UNIX Sys Admin "Quantum Mechanics - > > > mjs at ams.org The dreams that stuff > > > is made of" > > > > > > On Mon, 6 May 2002, GATHMAN,DON (HP-Boise,ex1) wrote: > > > > > > > Hi, > > > > > > > > I apparently was asleep at the wheel using scp, and > > > accidentally copied a > > > > file onto itself. Scp generated an Input/Output error and > > > did not perform > > > > the copy. However, now the file is corrupt. Is this a > > > but? Is there anyway > > > > to fix the file I messed up? > > > > > > > > Thanks, > > > > Don Gathman > > > > 208.396.6675 > > > > _______________________________________________ > > > > openssh-unix-dev at mindrot.org mailing list > > > > http://www.mindrot.org/mailman/listinfo/openssh-unix-dev > > > > > > > > > > _______________________________________________ > > > openssh-unix-dev at mindrot.org mailing list > > > http://www.mindrot.org/mailman/listinfo/openssh-unix-dev > > > > > > > Visit our website at http://www.ubswarburg.com > > > > This message contains confidential information and is intended only > > for the individual named. If you are not the named addressee you > > should not disseminate, distribute or copy this e-mail. Please > > notify the sender immediately by e-mail if you have received this > > e-mail by mistake and delete this e-mail from your system. > > > > E-mail transmission cannot be guaranteed to be secure or error-free > > as information could be intercepted, corrupted, lost, destroyed, > > arrive late or incomplete, or contain viruses. The sender therefore > > does not accept liability for any errors or omissions in > the contents > > of this message which arise as a result of e-mail transmission. If > > verification is required please request a hard-copy version. This > > message is provided for informational purposes and should not be > > construed as a solicitation or offer to buy or sell any > securities or > > related financial instruments. > > > > _______________________________________________ > > openssh-unix-dev at mindrot.org mailing list > > http://www.mindrot.org/mailman/listinfo/openssh-unix-dev > > > >Visit our website at http://www.ubswarburg.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.
scp /bsd localhost:/bsd should work with a recent version of scp on both client and server. On Mon, May 06, 2002 at 12:58:02PM -0400, GATHMAN,DON (HP-Boise,ex1) wrote:> Hi, > > I apparently was asleep at the wheel using scp, and accidentally copied a > file onto itself. Scp generated an Input/Output error and did not perform > the copy. However, now the file is corrupt. Is this a but? Is there anyway > to fix the file I messed up? > > Thanks, > Don Gathman > 208.396.6675 > _______________________________________________ > openssh-unix-dev at mindrot.org mailing list > http://www.mindrot.org/mailman/listinfo/openssh-unix-dev