Sponsored Content
Special Forums UNIX and Linux Applications Need to copy the latest file from Unix server to Shared folder Post 302562254 by Corona688 on Thursday 6th of October 2011 11:04:07 AM
Old 10-06-2011
Okay. And what's your UNIX server?

FTP is not a Windows file share. If it's FTP, you can use ftp and not mount anything.

That KSH script is full of FTP commands and won't work, because FTP is not KSH. You have to feed them into the ftp command, which is different on different versions of UNIX. What's your system?

"\\auviccf03\temp" is probably not a folder you can CD to, you'll need the actual folder not the network one. If you only have the network one then it's not FTP after all.

You've also got the mput before you change directory, which is probably not what you want.

Code:
#!/bin/ksh

ftp <<EOF
        lcd /home/manuownr/temp
        USER xxxx
        PASSWD xxxxx
        prompt n
        cd c:\path\to\file
        mput *.*
        quit
EOF


Last edited by Corona688; 10-06-2011 at 12:10 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

copy file from UNIX to shared directory

Hi, I want to copy a file from unix machine to a shared windows directory. i tried using the ftp command but i was able to transfer the file only to my local directory. Is there any way we can transfer/copy the files from unix to windows shared directory.......... Please help. Thanks (5 Replies)
Discussion started by: sireesha15
5 Replies

2. UNIX for Dummies Questions & Answers

Copy the latest file from a folder

Hi, I have a problem. I have some text files in a folder. The names can be like: emp_20080307053015.dat emp_20080306053015.dat emp_20080305053015.dat emp_20080304053015.dat The date format appended is like yyyymmdd and timestamp. What i need is i have to copy the latest file every... (3 Replies)
Discussion started by: Aswarth
3 Replies

3. UNIX and Linux Applications

Copy folder and its contents from HP Unix server to RH Linux

I am trying to copy a folder and all its contents from HP Unix box to RH linux, using the following. rsync -avz -e "ssh" /users/www/webroot/docFiles/Division/Ctry ftpuser@10.4.xxx.yz:/data/webroot/development/contentfiles/webroot/docFiles/Division/Ctry/QAfiles And it throws a consistent... (2 Replies)
Discussion started by: FanTom
2 Replies

4. Shell Programming and Scripting

copy the latest file in the remote server's directory

Hi Expert Team, I performed the below piece of code to copy the latest file in the remote server's directory to the same server's other directory. But it is not working properly. How can i handle this? Can you please help me..? ssh ${REMOTE_USERID}@${REMOTE_HOSTNAME} "cp -p `ssh... (3 Replies)
Discussion started by: spkandy
3 Replies

5. Shell Programming and Scripting

How to find the latest modified file from the unix server.

hi Friends, In my directory i have some files. I need to find out latest modified file. Please help me. Sreenu. (2 Replies)
Discussion started by: sreenu80
2 Replies

6. Shell Programming and Scripting

Need a script to fetch file from shared folder to unix box

Hi All, We have a requirement of pulling a file from shared folder to our unix box(Our application Servers). The Shared Folder and the servers are in teh same domain for eg UK domain For this purpose I got information like if in both source and destination ftp is enabled we can fetch the... (2 Replies)
Discussion started by: dhivya.enjoy
2 Replies

7. UNIX for Dummies Questions & Answers

Copy the latest (last file) in given folder

#!/bin/bash for i in {1..1536..1} do #find /home/test/Desktop/up111/workplace/Malware/$i/logs for a in /home/test/Desktop/up111/workplace/Malware/$i/logs/* do #max=a for b in /home/test/Desktop/up111/workplace/Malware/$i/logs/* do ... (4 Replies)
Discussion started by: upvan111
4 Replies

8. Shell Programming and Scripting

Copy folder and files from unix server to linux server

We would be migrating unix solaries to Linux redhat. Basically source is unix and target is linux. i would like to copy entire file system unix/source/* to target linux/souce/* but target linux has only folder setup so what ever files copied need to be placed in the linux server with same... (8 Replies)
Discussion started by: balajikalai
8 Replies

9. Shell Programming and Scripting

Copy file from UNIX to shared location

Hi All, I want to transfer file from UNIX to shared locataion . Shared location doesn't resides on my system. Can somebody tell me is there any way i can transfer file from UNIX to shared location without using any tool WINSCP. Thanks, Amit (1 Reply)
Discussion started by: Amit786
1 Replies

10. Shell Programming and Scripting

Copy one file from a server to a local folder

Hi, Is there a way I can copy a file from a server to a local folder (i.e. My Documents)? can it be done by scp? I tried this but it just rename the file as the folder it has to be transferred at. scp -r name@some_server:/home/user/file.txt 'somehere\home\home_dir' Thanks. (4 Replies)
Discussion started by: erin00
4 Replies
PQSTAT(1)							      pqstat								 PQSTAT(1)

NAME
pqstat - List jobs in NetWare print queue SYNOPSIS
pqstat [ -h ] [ -S server ] [ -U user name ] [ -P password | -n ] [ -C ] [ -B ] queue name [ job count ] DESCRIPTION
pqstat lists specified number of jobs from the specified NetWare print queue available to you on some server. If you are already connected to some server, this one is used. If pqstat does not print to a tty, the decorative header line is not printed, so that you can count the jobs in print queue by doing pqstat -S server queue | wc -l pqstat looks up the file $HOME/.nwclient to find a file server, a user name and possibly a password. See nwclient(5) for more information. Please note that the access permissions of .nwclient MUST be 600, for security reasons. OPTIONS
queue name queue name is used to specify queue. You can not use wildcards in the name. job count job count is used to specify how much entries will be shown. Default is to show all entries. -S server server is the name of the server you want to use. -U user name If the user name your NetWare administrator gave to you differs from your unix user-id, you should use -U to tell the server about your NetWare user name. -P password You may want to give the password required by the server on the command line. You should be careful about using passwords in scripts. -n -n should be given to mount shares which do not require a password to log in. If neither -n nor -P are given, pqstat prompts for a password. -C By default, passwords are converted to uppercase before they are sent to the server, because most servers require this. You can turn off this conversion by -C. -B By default, pqstat lists the Netware name of the print job owner. -B causes it to list the banner name instead. SEE ALSO
nwclient(5), nprint(1), slist(1), ncpmount(8), ncpumount(8), pqlist(1), pqrm(1) CREDITS
pqstat was written by David Woodhouse (dave@imladris.demon.co.uk) pqstat 03/03/1998 PQSTAT(1)
All times are GMT -4. The time now is 11:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy