LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-28-2009, 09:37 AM   #1
gjagadish
Member
 
Registered: Oct 2005
Location: India
Distribution: Fedora Core
Posts: 88

Rep: Reputation: 15
Require some knowledge on file copying across networks


Hi all,

I just need to know what happens behind the scenes in the following situation,

1. Kick off some file transfer from machine A to machine B via SSH
2. While the file is being transferred, i deleted the destination file in machine B.
3. But in machine A, it shows that the file is still being transferred.

I don't know where it is transferring the file. Can someone help me to understand what is happening here?

And what will happen if i move the destination file to some other directory while it is being transferred from machine A ?

-Jagadish
 
Old 05-28-2009, 09:47 AM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Linux systems don't write data directly to the disk, it is first cached in RAM until the system has some free time to permanently store it. So what you are seeing is machine A sending the file into the RAM of machine B.

Once the system realizes the file is not there anymore, it should just "forget" about it and free the RAM up for something else.
 
Old 05-28-2009, 08:16 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
To go a little deeper, rm ( implemented using unlink() ) doesn't actually delete the file until all processes using it have completed. However, it will not be visible using the ls cmd.
If you use a large enough file, you should be able to see disk usage via df or du, iirc.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 Require user with Require group Russianspi Linux - Server 2 01-30-2008 11:21 AM
Urgent : Automated scripts require to check device file in hpux manish_meet_in Linux - Newbie 4 01-26-2007 01:45 PM
What is the best knowledge base and web based file repository? HGeneAnthony Linux - Software 2 04-11-2006 04:37 PM
spec file programming - Require tag rindjon Programming 2 03-29-2006 02:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration