mdelete


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting mdelete
# 1  
Old 03-07-2008
mdelete

Hello,
I have a big problem with mdelete and I don't know further. In my shell script mdelete filename1 filename2 filename3 etc. does not delete alle files.

Here's the log:

-rw-r--r-- 1 root root 1 Mar 7 14:40 corrado
-rw-r--r-- 1 root root 1 Mar 7 14:40 golf
-rw-r--r-- 1 root root 1 Mar 7 14:40 hobbit
-rw-r--r-- 1 root root 1 Mar 7 14:40 lupo
-rw-r--r-- 1 root root 1 Mar 7 14:40 passat
-rw-r--r-- 1 root root 1 Mar 7 14:40 tolkien
mdelete corrado? mdelete golf? mdelete hobbit? mdelete lupo? mdelete passat? mdelete tolkien?




Why is there an question mark instead of a new line?

And that's the script snippet:




cd ${WrkDir}
WrkList=`ls -1 | tr '\n' ' '`

ftpcmd="user ${User} ${Passwort}
cd ${QuellDir}
ls -AlF
mdelete $WrkList
ls -AlF
bye"

/usr/bin/ftp -n $IP_FTP << EOF | more >> $LogDatei
$ftpcmd
EOF
# 2  
Old 03-07-2008
Shut off interactive mode in ftp:



Code:
/usr/bin/ftp -in $IP_FTP << EOF | more >> $LogDatei

Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with FTP mdelete

Hi, I have some backup scripts running. They allocate the files in separated folders, according to the current day. (01, 02, 03...., 31) After 1 month, the "cycle" starts again, and the files are uploaded to the folder 01, 02... When that happens, I want the previous files to be deleted, so... (4 Replies)
Discussion started by: rafaces
4 Replies

2. UNIX for Dummies Questions & Answers

mdelete command in FTP

What I need to do is ftp some files on a remote server, but before postong the file need to delete any existing file from the path on the remote dir. I am using the mdelete command for the same as follows : open server_name user_id password prompt off ascii cd /test mdelete * IF the... (3 Replies)
Discussion started by: rohini
3 Replies

3. Shell Programming and Scripting

mdelete power

hi to all! im using hp-ux 10.2 is it posible for the mdelete command to execute on the root directory if it did not find any file on the specified sub-directory? this is my sample script USER=root PASSWD=root cd /u01/app/oralog/arch ftp -n 192.119.10.3 user $USER $PASSWD prompt... (2 Replies)
Discussion started by: gunsbong
2 Replies
Login or Register to Ask a Question