- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- use ftp to move file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2009 06:05 PM
тАО04-26-2009 06:05 PM
use ftp to move file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2009 06:55 PM
тАО04-26-2009 06:55 PM
Re: use ftp to move file
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2009 07:11 PM
тАО04-26-2009 07:11 PM
Re: use ftp to move file
I read ? but not found move , mv command , the rename is not change the file name , I really want to move the file to backup directory in remote server not just rename , can ftp do it ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2009 09:32 PM
тАО04-26-2009 09:32 PM
Re: use ftp to move file
I remember sftp have options to rename the file from old path to newpath
Shankar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2009 10:10 PM
тАО04-26-2009 10:10 PM
Re: use ftp to move file
You can used cd and lcd
cd for remote directiory and
lcd for local directiory.
then move the desire file to remote location and delete the file with delete command.
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2009 11:14 PM
тАО04-26-2009 11:14 PM
Re: use ftp to move file
you said "then move the ..." , how to move , can advise what command that I can use ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2009 11:21 PM
тАО04-26-2009 11:21 PM
Re: use ftp to move file
Fortunately move command is not available on ftp. Indeed rename is doing the same function. I assume that you are getting a file called test.txt from remote server through ftp and want to move to backup directory after fetching the file.
You just need to add this lines in your script after copying the files.
#--------------------------------------------
# Move and Rename the file on remote server # after copying
#--------------------------------------------
ftp <<**
open abc.company.com
rename test.txt /tmp/test.txt.`date +'%d%b%y`bye
**
This will remove the source file and move to /tmp directory as test.txt.27Apr09
Instead of /tmp, I would suggest you to create a backup directory on user home directory(or somewhere) and move over there.
rename test.txt ./backup/test.txt.`date +'%d%b%y`
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2009 11:24 PM
тАО04-26-2009 11:24 PM
Re: use ftp to move file
Typo error on my previous post. Script should be like this.
#--------------------------------------------
# Move and Rename the file on remote server after copying
#--------------------------------------------
ftp <<**
open abc.company.com
rename test.txt /tmp/test.txt.`date +'%d%b%y`
bye
**
Sincere apolosize for the mistake.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2009 12:07 AM
тАО04-27-2009 12:07 AM
Re: use ftp to move file
I tried it , but pop error
350 Ready for RNTO.
550 Rename failed.
can advise what is wrong ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2009 12:10 AM
тАО04-27-2009 12:10 AM
Re: use ftp to move file
this is permission problem , i got it already , thx for your help .