Sponsored Content
Top Forums Shell Programming and Scripting deleting multiple files through ftp Post 302071137 by jim mcnamara on Wednesday 12th of April 2006 03:13:01 PM
Old 04-12-2006
Code:
echo "
 open nodename
 user me pass
 cd /path/to/files
"       > ftp_$$.tmp
while read file
do 
    echo "delete $file"
done < list_of_files >> ftp_$$.tmp

echo "
 bye
 " >> ftp_$$.tmp

ftp -n < ftp_$$.tmp

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to send multiple files during ftp

Hi guys... I'm working on #!/bin/sh script in a Solaris 7 box that should send several files over to another machine via FTP. Here's what the script looks like: # This script will send the daily MSP customer counts # to the Crystal Reports server located at 192.168.2.106 cd... (2 Replies)
Discussion started by: cdunavent
2 Replies

2. HP-UX

how to ftp multiple files

Hi, I have to write a ftp script which transfers multiple files from one unix server to another. When I try to transfer single file it goes through successfully. But, When I try to do multiple files none of the files get ftp'd. And also, even the single file goes transferred successfully, I... (4 Replies)
Discussion started by: isingh786
4 Replies

3. Shell Programming and Scripting

deleting lines from multiple text files

I have a directory full of text data files. Unfortunately I need to get rid of the 7th and 8th line from them all so that I can input them into a GIS application. I've used an awk script to do one at a time but due to the sheer number of files I need some kind of loop mechanism to automate... (3 Replies)
Discussion started by: vrms
3 Replies

4. Shell Programming and Scripting

Need help in deleting old files from a ftp server

Hi, I'm quite new to unix and perl scripting and need to write a script to delete files older than 7 days from a remote ftp server. Unix or Perl script would do... I wrote the following code: #!/usr/local/bin/perl use File::Basename; use Net::FTP; #use Net::FTP::File; my $verbose =... (15 Replies)
Discussion started by: arunsoman80
15 Replies

5. Shell Programming and Scripting

Deleting a column in multiple files that are comma separated

Hi, I have a directory that contains say 100 files named sequencially like input_1.25_50_C1.txt input_1.25_50_C2.txt input_1.25_50_C3.txt input_1.25_50_C4.txt .. .. .. input_1.25_50_C100.txt an example of the content in each of the file is: "NAME" "MEM.SHIP" "cgd1_10" "cgd1_10"... (9 Replies)
Discussion started by: Lucky Ali
9 Replies

6. UNIX for Dummies Questions & Answers

Deleting Multiple Files With the Same Content

My website has been hacked and i need to remove a lot of unique files with same content. The files have very similar code: eval(base64_decodeHow do i find multiple/all the files with the above code and remove them? Thanks. (10 Replies)
Discussion started by: Boris_yo
10 Replies

7. Shell Programming and Scripting

FTP multiple files from multiple directories

I have multiple files that starts as TRADE_LOG spread across multiple folders in the given structure.. ./dir1/1/TRADE_LOG*.gz ./dir2/10/TRADE_LOG*.gz ./dir11/12/TRADE_LOG*.gz ./dir12/13/TRADE_LOG*.gz when I do ftp uisng mput from the "." dir I am getting the below given error mput... (1 Reply)
Discussion started by: prasperl
1 Replies

8. UNIX for Dummies Questions & Answers

problem deleting multiple files using rm in UNIX

I'm baffled..... the system I work on creates files every Mon-Friday I'm trying to delete all files older than 30 days old from a Unix prompt, the command I'm using is: find /directory/ -mtime +30 -exec rm {} \; however it returns /directory/filename: 644 mode ? (y/n) for every file! ... (1 Reply)
Discussion started by: bquattrone
1 Replies

9. Shell Programming and Scripting

Transfer multiple different files in FTP

Hi All, i am doing ftp how can i transfer multiple different files example- 03-21-13 06:33AM 46800 CATT_HOURS.pgp 03-21-13 06:33AM 266392 CATT_TAX.txt 03-21-13 06:33AM 91448 CATT_STATUS.txt 03-21-13 06:33AM 468 ... (3 Replies)
Discussion started by: krupasindhu18
3 Replies

10. Shell Programming and Scripting

Deleting multiple files off an ftp server once they have been downloaded

Hello, I have a server that I have to ftp files off and they all start SGRD and are followed by 6 numbers. SGRD000001 SGRD000002 SGRD000003 The script I have will run every 10 mins to pick up files as new ones will be coming in all the time and what I want to do is delete the files I have... (7 Replies)
Discussion started by: sph90457
7 Replies
rmvb(9F)						   Kernel Functions for Drivers 						  rmvb(9F)

NAME
rmvb - remove a message block from a message SYNOPSIS
#include <sys/stream.h> mblk_t *rmvb(mblk_t *mp, mblk_t *bp); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). PARAMETERS
mp Message from which a block is to be removed. mblk_t is an instance of the msgb(9S) structure. bp Message block to be removed. DESCRIPTION
rmvb() removes a message block (bp) from a message (mp), and returns a pointer to the altered message. The message block is not freed, merely removed from the message. It is the module or driver's responsibility to free the message block. RETURN VALUES
If successful, a pointer to the message (minus the removed block) is returned. The pointer is NULL if bp was the only block of the message before rmvb() was called. If the designated message block (bp) does not exist, -1 is returned. CONTEXT
rmvb() can be called from user or interrupt context. EXAMPLES
This routine removes all zero-length M_DATA message blocks from the given message. For each message block in the message, save the next message block (line 10). If the current message block is of type M_DATA and has no data in its buffer (line 11), then remove it from the message (line 12) and free it (line 13). In either case, continue with the next message block in the message (line 16). 1 void 2 xxclean(mp) 3 mblk_t *mp; 4 { 5 mblk_t *tmp; 6 mblk_t *nmp; 7 8 tmp = mp; 9 while (tmp) { 10 nmp = tmp->b_cont; 11 if ((tmp->b_datap->db_type == M_DATA) && (tmp->b_rptr == tmp->b_wptr)) { 12 (void) rmvb(mp, tmp); 13 freeb(tmp); 14 } 15 tmp = nmp; 16 } 17 } SEE ALSO
freeb(9F), msgb(9S) Writing Device Drivers STREAMS Programming Guide SunOS 5.10 11 Apr 1991 rmvb(9F)
All times are GMT -4. The time now is 06:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy