LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 02: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, 04:25 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora, Lubuntu, FreeBSD
Posts: 3,930
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


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 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-29-2008 12:41 AM
SCSI ABORT operation problem halturata Linux - Hardware 1 09-04-2007 03:46 AM
apt-get >> abort problem Coldfish Debian 1 09-23-2005 10:42 AM
Adaptec aic7xxx ABORT -- need help!!! geos Linux - Hardware 1 07-15-2003 09:26 PM
passwd: Critical error - immediate abort dojit Linux - General 2 03-07-2001 02:04 AM


All times are GMT -5. The time now is 04:05 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration