The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
.netrc and ftp magikalpnoi AIX 4 07-07-2008 04:22 AM
using .netrc sveera UNIX for Advanced & Expert Users 6 03-26-2008 04:58 PM
.netrc file grandtheftander UNIX for Dummies Questions & Answers 2 07-26-2006 01:10 PM
.netrc limits in Aix 4.3 lawadm1 UNIX for Advanced & Expert Users 0 03-23-2005 01:48 AM
Help in .netrc edu_escandor UNIX for Dummies Questions & Answers 2 03-22-2005 07:12 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-09-2005
txdave txdave is offline
Registered User
  
 

Join Date: Apr 2005
Posts: 3
.netrc and ftp issue

Ok guys (gals?) Im new here as a member, but have come here many times to find answers to questions.
Have played with Unix (ATT Sys 5) and now Linux (RH)...

I told myself I wanst going to ask for help on the current project..but.. I am down to what I think is the last issue:

(and I KNOW the answer has got to be sooo simple yet it is slipping by me)

Using .netrc to ftp to a windows based desktop pc (win 2000 or Xp) and looking for and retreiving a .TXT file once every 30 seconds and then WANTING to DELETE the file (s) on the remote machine after getting them.

All works fine EXCEPT the deletion part.

My .netrc looked like this:

macdef getfile
lcd wxmsg
cd wx
mget *.TXT
delete *.TXT (which of course didnt work)
lcd /usr/weather
quit


I FOUND on here in the FAQ's this script:


shaik786
Guest

Posts: n/a
Here's a sample $HOME/.netrc file:
Code:

machine other_host
login user123
password password123
macdef init
hash
prompt
mget /users/shaik/*.c
mdel /users/shaik/*.c
bye


So I made mine look like that and it still does everything BUT delete the file on the remote machine - and with no apparent errors!

It appears that the 'BYE" is executed while the "MDEL" is waiting for a "Y" answer to 'do you want to delete this?'

Any help? My head hurts

Thanks
David
  #2 (permalink)  
Old 04-09-2005
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,131
What you're doing looks like it should work. And it does with the HP-UX ftp client. It could be a client issue. This page mentions:
Quote:
WARNING: Many ftp clients have a safeguard built-in to the MDEL command, requiring confirmation for each dataset before deleting it. However, the VM/CMS ftp client does NOT request that you confirm each file before deleting: the CMS ftp client just goes ahead and deletes all files that match. So if you are using the VM/CMS ftp client to access MVS, beware!
  #3 (permalink)  
Old 04-09-2005
txdave txdave is offline
Registered User
  
 

Join Date: Apr 2005
Posts: 3
Humm... Thanks for that tip...

I did not even consider that (was blaming myself)...

Guess I could try to echo a "y" <cr> in the script, dont know if that would play or not..well off tho the other machine

THANKS for the reply!!!
  #4 (permalink)  
Old 04-13-2005
txdave txdave is offline
Registered User
  
 

Join Date: Apr 2005
Posts: 3
Update on this issue:

The "delete" command in .netrc still dosent work.

However, after looking back over the entire scriptI saw what I thought might be the cure...
I was (am) using autoftp with .netrc ... I realized I had the '-i' option in the auotftp AND the 'prompt' in the modified .netrc which was effectivley canceling each other out..I removed the 'prompt out of ,netrc and used 'mdel' ..the script works just fine.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:33 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0