![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| OfflineIMAP makes messages and attachments available locally | iBot | UNIX and Linux RSS News | 0 | 05-06-2008 04:40 AM |
| Delete and copy file(s) slowly(!?) | trantuananh24hg | SUN Solaris | 5 | 02-21-2008 11:00 PM |
| Unzip, copy, and delete loop | spyne | Shell Programming and Scripting | 3 | 03-07-2007 01:30 PM |
| Command for copy a file from one server to another server | sarwan | High Level Programming | 2 | 11-13-2005 11:17 AM |
| Telnet and file Copy/Delete Problem | biglemon | UNIX for Dummies Questions & Answers | 17 | 08-08-2002 08:29 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi,
I've got a cronjob running daily creating backup files. How can I send that created file to a remote server & then delete it on my workstation to save space? The filename format is as follows: proj_bk_20070624_15h30, proj_bk_20070625_15h30, etc tar cvf - /project | gzip -c > proj_bk_$(date '+20%y%m%d_%Hh%M').tar.gz ftp remote_server << EOT binary put ?????.tar.gz (How do I put the latest created pro_bk file onto the remote server?) quit EOT rm ?????.tar.gz (How do I delete the sent file locally?) |
|
||||
|
This Would Help Hopefully
If you are moving the file on daily basis then only 1 file with "proj_bk*" is present on the server, incorporate the following changes in the ftp part.
prompt mput proj_bk_$(date '+20%y%m%d')_*.tar.gz After end of FTP just remove the file rm proj_bk_$(date '+20%y%m%d')_*.tar.gz Hope this helps.... |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|