Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 05-28-2009, 09:37 AM   #1
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 ?

Old 05-28-2009, 09:47 AM   #2
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
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 18,231

Rep: Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708Reputation: 2708
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:14 PM.

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