08-12-2006
Quote:
Originally Posted by matrixmadhan
its assumed that files of type xxx*.txt are being transferred through the script and thats an indirect way of identifying how many files are going to be transferred with the ls -1 xxx*.txt | wc -l option....
another option has mentioned here to grep from the logs after ftping...
you do use multiple file transfer and why isnt that interactive prompting is not turned off by specifying -i option?
Hi Madan,
First i would like to thank you for your reply.
I don't have much knowledge on both shell scripting as well as on FTP.
I just came to know by seeing the reply that -i option is used to turn off tthe interactive scripting.
Can you please suggest me the code we should be added in the code which i have sent to
1.Log files whenever the script is executed and
2.total number of files transfered.
Regards,
Azaz.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi, I'm having problems when trying to transfer multiple files from remote Pc to AS/400, using command MGET. After successfully connected to remote location and typed MGET FILE1 FILE2 FILE3 (REPLACE;
I receive this message:
125 Data connection already open; Transfer starting.
226 Transfer... (3 Replies)
Discussion started by: freddyp
3 Replies
2. Shell Programming and Scripting
Hi Gurus,
I need to find out, if i have transferred a file from ftp thro bin mode or ascii mode. Say if i have a file called "dec.sh"( u shuld normally transfer thro ascii mode). How can i find out that dec.sh is tranferred from ftp server thro ascii mode or bin mode?
Any help would be... (9 Replies)
Discussion started by: Ashok_oct22
9 Replies
3. UNIX for Dummies Questions & Answers
i need to know how files can be transfered from one system to another securely in linux. (9 Replies)
Discussion started by: bibing
9 Replies
4. Shell Programming and Scripting
Validating the size of file transferred from ftp server to the local system.
File type: Text file/Flat file
Source System: Windows / Unix Systems
Target System is always: Unix
Mode of Transfer : ASCII
We have generic ftp shell script that transfers the files from different ftp servers. ... (2 Replies)
Discussion started by: jpundalik
2 Replies
5. Shell Programming and Scripting
Hi!
I just want to count number of files in a directory, and write to new text file, with number of files and their name
output should look like this,,
assume that below one is a new file created by script
Number of files in directory = 25
1. a.txt
2. abc.txt
3. asd.dat... (20 Replies)
Discussion started by: Akshay Hegde
20 Replies
6. Solaris
We have umask defined under /etc/.login as 022.
I have my user specific umask defined in /userhome/.login as 002.
I understand ftp will not execute anything at destination, it simply transfers files.
But it seem to be using 022 as umask for the files transferred. How does ftp knows what umask... (4 Replies)
Discussion started by: kchinnam
4 Replies
7. Shell Programming and Scripting
Hi,
i want to execute a shell script which transfers files from one server to another using ftp in unix. How can i check whether the ftp is successful or not.(i.e files are transferred to destination server). because if i am checking the return code of ftp, it always shows 0 (denoting ftp is... (5 Replies)
Discussion started by: Little
5 Replies
8. Shell Programming and Scripting
We are transferring xml files to remote machine through cronjob @every 5 mins and then will move the files to the backup folder is source server.
Sometimes the file is transferred as 0kb to destination server, whereas the file in the source backup folder is completely written.
There is no error... (6 Replies)
Discussion started by: Bhavi
6 Replies
9. Shell Programming and Scripting
Hi experts,
I am using KSH and I am need to display file with number in front of file names and user can select it by entering the number.
I am trying to use following command to display list with numbers. but I do not know how to capture number and identify what file it is to be used for... (5 Replies)
Discussion started by: mysocks
5 Replies
10. UNIX for Beginners Questions & Answers
I've a folder in remote server and it has 50 files. I like to transfer these files by first 10 and next 10 files.
I'm using mget command to transfer the files. How to limit the file transfer limit to 10. instead of copying 50 files at a time.
Thanks
Janarthan (5 Replies)
Discussion started by: Janarthan
5 Replies
uux(1c) uux(1c)
Name
uux - unix to unix command execution
Syntax
uux [-] command-string
Description
The command gathers 0 or more files from various systems, executes a command on a specified system, and sends standard output to a file on
a specified system.
The command-string is made up of one or more arguments that look like a shell command line, except that the command and file names may be
prefixed by system-name!. A null system-name is interpreted as the local system.
File names may be one of the following:
o A pathname
o A pathname preceded by ~xxx, where xxx is a userid on the specified system and is replaced by that user's login directory
o Any other syntax that is prefixed by the current directory.
For example, the following command line gets the f1 files from the usg and pwba machines, executes a command and puts the results in
f1.diff in the local directory.
uux "!diff usg!/usr/dan/f1 pwba!/a4/dan/f1 > !f1.diff"
When using special shell characters such as <>'!, you should either quote the entire command-string, or you should quote the special char-
acters as individual arguments.
The command attempts to get all files to the execution system. If both the file and command are located on different remote sites, the
file is first brought to the local system and is then transferred to the execution system.
If you want to include files as arguments to a command, but you do not want those files to be processed by enclose the filename in paren-
theses. For example:
uux a!uucp b!/usr/file (c!/usr/file)
The previous example sends a command to system The is transferred from system to the local system, and then is passed to system When
arrives at system the command executes and sends to system
If the request is not allowed on the remote system, the command notifies you. This response is sent through remote mail from the remote
machine.
Options
-c, -l
Do not copy local file to the spool directory for transfer to the remote machine. This is the default.
-ggrade
Specifies the grade which is a single letter or number from 0 to 9, A to Z, or a to z. The highest grade is 0, the lowest grade is z.
The default is A. Lower grades should be specified for high-volume jobs, such as news.
-n Sends no notification to user.
-p, -
Reads stdin.
-r Queues the job, but does not start the file transfer.
-xdebug
Produces debugging output on stdout. The debug option is a number between 0 and 9. Higher numbers provide more detailed information.
Debugging is permitted only for those users with read access to
-z Notify the user if the command fails.
Warning
An installation may limit the list of commands executable on behalf of an incoming request from Typically, a restricted site permits little
other than the receipt of mail through
Restrictions
Only the first command of a shell pipeline may have a system-name!. All other commands are executed on the system of the first command.
The use of the shell metacharacter asterisk (*) shell metacharacter may not behave as you expect. The shell tokens (<< >>) are not imple-
mented.
You are not notified when execution on a remote machine is denied. Only commands listed in on the remote system are executed at the remote
system.
Files
/usr/spool/uucp spool directory
/usr/lib/uucp/* other data and programs
See Also
uucp(1c)
"Uucp Implementation Description" ULTRIX Supplementary Documents Vol. III: System Manager
uux(1c)