Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Copying dir (and sub dir) file names from ftp server to txt file in diff server Post 302382480 by quirkasaurus on Wednesday 23rd of December 2009 11:07:56 AM
Old 12-23-2009
well, my recommendation is to create the directory, sub-directory listing on the ftp server ( is it Windows or UNIX ) and then ftp that file over, don't try to use ftp to create it.

on UNIX:

Code:
find $dir_of_interest -print > ftp_list.txt

on Windows: ( DOS batch file )

just plain ol'

Code:
DIR /S > some_text_file.txt

should be good enough to get you what you need.

for dos, even better ( for creating just a listing ) is:
Code:
xcopy THIS_DIR SOME_OTHER_DIR /L /E > C:\listing.txt


Last edited by quirkasaurus; 12-23-2009 at 12:15 PM.. Reason: adding another command
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

To get the dir list of a remote server

Dear all; I am new to UNIX scripting and I want to download remote server's dir listing every hour, to check whether it is updating. How can I do this. can I use ftp command to down load this dir listing. Pls help me in this regards. tks (1 Reply)
Discussion started by: HMS.Chandrasiri
1 Replies

2. UNIX for Advanced & Expert Users

Recursively check the file/dir names

Hi, ' recgrep find . | xargs grep ' is used to scan the contents recursively. I have a different requirement. I need to scan just the names and check for a pattern and display with fullpath. Is that already available? Closest that I am trying is 'ls -R | grep pattern' Here I would get multiple... (1 Reply)
Discussion started by: eagercyber
1 Replies

3. UNIX for Dummies Questions & Answers

How to copy the dir from one server to other

Hi, i am new to unix os. i have an existing unix(AIX) server in which we hav /usr1. now my task is to copy (EXACTLY) all the dir/sub-dir, including the owners/groups/users as well into the new Unix (AIX) servers. there are 8 dir in /usr1. but there are bunch of sub-dir/.. with diff... (1 Reply)
Discussion started by: krishnadvn
1 Replies

4. Shell Programming and Scripting

copying a file from one dir to another dir

hi i have a script compareFiles() { find /tmp/Satya -type f | \ while read filename1 do echo "----------------------------------------$filename1" find /tmp/Satya -type f | \ while read filename2 do if diff $filename1 $filename2 then echo "Both files... (3 Replies)
Discussion started by: Satyak
3 Replies

5. Shell Programming and Scripting

Moving file(s) from dir to dir

Hi, I am fairly new to writing scripts. I am trying to write a script that moves either One or All of the files from one directory to another. I know how to make the actual command to do it, but i don't quite know how to add operators to it, ie -i or -a. I want -i to move one file from... (4 Replies)
Discussion started by: SirJoeh
4 Replies

6. UNIX for Dummies Questions & Answers

How to list all files in dir and sub-dir's recursively along with file size?

I am very new to unix as well as shell scripting. I have to write a script for the following requirement. In have to list all the files in directory and its sub directories along with file path and size of the file Please help me in this regard and many thanks in advance. (3 Replies)
Discussion started by: nmakkena
3 Replies

7. Shell Programming and Scripting

Create file Dir and Sub Dir same time

Hi Guys , I want create files Dire and Sub Dire. as same time using variable. EX: x1="/hk/Pt/put/NC/R1.txt" x2="/hk/pt/Put/Ot/NC/RN.txt" And i want delete all after done with my script. Thanks (2 Replies)
Discussion started by: pareshkp
2 Replies

8. UNIX for Dummies Questions & Answers

copying the dir/subdir structure from one server to another?

Hi All, I want to copy the dir/subdir structure from SERVER-A to SERVER-B without copying all the files in each dir. Is it possible using SCP / SFTP command? For example, SERVER-A has following two dir/subdirectories and files under each subdir. ... (1 Reply)
Discussion started by: Hangman2
1 Replies

9. Shell Programming and Scripting

Renaming File Names in a folder/Dir

Hi Team, I'm new to Unix shell scripting . I've the following requirement A folder contains the list of files with the following format ab.name.11.first ab.name.12.second ab.name.13.third ---------- I have to rename the above file to like below ... (6 Replies)
Discussion started by: smile689
6 Replies

10. Shell Programming and Scripting

List the file names available on FTP server before selecting the required file

Below is my script code.which shows the environment name and then fetch the file from the ftp server but I am facing one issue.The script should be run in both way.We can pass the arguments with script and select the environment name then file name.Here the issue is I am not able to list the files... (1 Reply)
Discussion started by: anuragpgtgerman
1 Replies
ftpservers(4)						     Kernel Interfaces Manual						     ftpservers(4)

NAME
ftpservers - ftpd virtual hosting configuration specification file SYNPOSIS
DESCRIPTION
The file is used to tell which set of virtual domain configuration files that the server should use. With support, wu-ftpd has the ability to use separate configuration files for each virtual domain. For a virtual host, configuration files can be placed into a separate virtual domain directory. The directory path and the virtual host IP address that is to use those configuration files is listed in the file. The actual configuration files put into the virtual domain direc- tory MUST be named as follows: virtual domain's access file. restrict the accounts that can use the web server." SITE GROUP and SITE GPASS support." allow or deny usernames access to that virtual server." customize conversions available in the virtual domain." You do not need to put every file in each of the virtual domain directories. If you want a set of domains to use the master copy of a file, for example, the file, then do not include that file in those virtual domain directories. In that case the default master copy will be used. The file names must match those listed above. If you misspell any of them or name them something else, the server WILL NOT find them and the master copy of them will be used instead. ftpservers File Format There are two fields to each entry. For example: When an ftp client connects to the server, tries to match the IP address the ftp client connected to with one found in the file. If a match is found the path to the specified directory containing the configuration files for that specific domain is returned. The server uses any configuration files in that directory. If a match is not found, or an invalid directory path is encountered, default paths to the configuration files are used. The use of in the example above fails the check for a specific directory and the master configuration files will be used. Either the actual IP address or a specific hostname can be used to specify the virtual domain. It is better to specify the actual IP of the virtual domain as it reduces the need for a domain lookup and eliminates DNS security related naming issues. Comment lines are depicted with a # sign. Both comment lines and blanklines are ignored. FILES
AUTHOR
was developed by the Washington University, St. Louis, Missouri. SEE ALSO
ftpd(1M) , ftpaccess(4) , ftpconversions(4) , ftphosts(4). ftpservers(4)
All times are GMT -4. The time now is 03:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy