LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-03-2008, 01:58 PM   #1
brian_p_sully
LQ Newbie
 
Registered: Jan 2003
Posts: 8

Rep: Reputation: 0
I abort scp, how do I clean up?


I am programaticly scp'ing a large file between two servers. For a variety of reaons (such as low disk space) this process can be aborted. When the scp client is killed the destination retains a partially transferred file. Since the file is incomplete I would like it to be automatically deleted. Is there a simple way to do this? I didn't seen any intuitive options on the scp man page.
 
Old 01-03-2008, 03:25 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
There is probably a more proper way, but here is one idea:
Code:
$ scp bigfile user@host:~ || ssh user@host rm bigfile
(bash shell obviously.)
 
  


Reply

Tags
scp



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
scp does not work and gives the following error message: scp: FATAL: Executing ssh1 i akay Linux - Networking 16 09-28-2008 11:41 PM
SCSI ABORT operation problem halturata Linux - Hardware 1 09-04-2007 02:46 AM
apt-get >> abort problem Coldfish Debian 1 09-23-2005 09:42 AM
Adaptec aic7xxx ABORT -- need help!!! geos Linux - Hardware 1 07-15-2003 08:26 PM
passwd: Critical error - immediate abort dojit Linux - General 2 03-07-2001 01:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:31 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