Reputation: 4685
I am learning cmd line ftp and was wondering how i can transfer a file to a remote directory while simultaneously removing the local copy.
Is this possible ?
I don't wan't to transfer and then run a delete command, but so far all i have is:
mput *xml
Which doesn't remove the local copy
Upvotes: 0
Views: 1327
Reputation: 946
You can execute arbitrary shell commands from within most command line ftp programs w/ a bang (!
). So I guess you could do:
ftp> !pwd
/home/foo_user
ftp> mput *xml
ftp> ! rm *xml
But I think this might be kind of dangerous since you might inadvertently delete something important
Upvotes: 1