Sponsored Content
Full Discussion: FTP Question
Top Forums UNIX for Advanced & Expert Users FTP Question Post 46056 by Perderabo on Wednesday 7th of January 2004 09:38:02 PM
Old 01-07-2004
The best solution is: don't do that. Including hours, minutes, seconds, microseconds, etc in a daily filename only creates the problem you now face.

If that is not possible, you face a challenging scripting problem. You will need to perform a dir, retrieve the results, determine the proper directory name, and finally cd to that directory.

I demonstrate all of this in my recursive ftp script. You might want to look at it for some ideas.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

FTP question

Hi all, I have a simple script that runs each night and transfers a number of files to a remote server. Before files are transferred existing files on the remote box are deleted. All works OK except the deletion part on the remote box returning no such file or directory. As work around Ihave... (2 Replies)
Discussion started by: tzp2ft
2 Replies

2. UNIX for Dummies Questions & Answers

FTP Question

I am really new to unix and want to setup an ftp server on my PC I am running a Ultra 5 with solaris 9 on it. I cannot seem to find *any* documentation on how to do this. So I was hoping somebody could point me in the right direction. :confused: (3 Replies)
Discussion started by: ls=dir
3 Replies

3. UNIX for Dummies Questions & Answers

FTP Question

When a user FTP's to their own directory, they can go up the directory and view others files, of course they can not overwrite them but are able to download them if they wish to, is there any way to stop them from view their files and have them be only able to view files that they have permissions... (3 Replies)
Discussion started by: foresthillian
3 Replies

4. UNIX for Advanced & Expert Users

FTP Question

Once a file is ftped to a server is there a way that you can prevent that file from being overwritten if the same process tries to ftp a file with the same name again? (6 Replies)
Discussion started by: lesstjm
6 Replies

5. UNIX for Dummies Questions & Answers

FTP Question

I'm basically trying to FTP a file to a differnt node, first putting the FTP commmands into a text file and then piping the commands file into the ftp command as follows.... echo "user $USERNAME $PASSWORD" > ftp_cmds echo "put $SQLOUT /users/$USERNAME/$SQLOUT" >> ftp_cmds echo "quit" >>... (4 Replies)
Discussion started by: djkane
4 Replies

6. UNIX for Dummies Questions & Answers

FTP Question

How do you limit an ftp user access to a certain Unix path when putting/getting file to/from your server? And how do you restrict the ftp user from using "cd" or "ls" commands? Given that the ftp user knows the ftp userid, password, and your server ip address. Thanks in advanced :) (1 Reply)
Discussion started by: XZOR
1 Replies

7. UNIX for Dummies Questions & Answers

Question on FTP

Hi All, I'm new to this group and this is my first post to this group. I need to write a shell script for the requirement given below: 1. I need to connect to a ftp server with my username and password 2. I need to go to some(input) directory. 3. I will have files with same names and... (1 Reply)
Discussion started by: ranjith_taurean
1 Replies

8. Shell Programming and Scripting

ftp question

Hi, i have a simple question here-- if we dont use binary while doing a ftp of a file,any sort of problem can arise from this or it is ok. Thanks (2 Replies)
Discussion started by: namishtiwari
2 Replies

9. Shell Programming and Scripting

FTP question

HI In my script its like this ------------ echo "Enter filename" read fname ftp -v -n abcd.efh.kk.com << EOF user userid pwd bin mget $fname.tar--not working if i give "$fname", works only as "demo.tar" bye ------------ My target is to get a $fname.tar from a remote host.How... (4 Replies)
Discussion started by: coolkid
4 Replies

10. UNIX for Dummies Questions & Answers

ftp question

I have this FTP script: ADDR=168.218.95.172 ftp -inv $ADDR <<- ftpcmds user HEHCFTP H$h673sp ... (3 Replies)
Discussion started by: lena keung
3 Replies
rpm2html(1)						      General Commands Manual						       rpm2html(1)

NAME
rpm2html - make an html database from rpm repository SYNOPSIS
rpm2html [-q][-v][-force][-lang langfile] config-file DESCRIPTION
Rpm2html tries to solve 2 big problems one face when grabbing a RPM package from a mirror on the net and trying to install it: - it gives more information than just the filename before installing the package. - it tries to solve the dependency problem by analyzing all the Provides and Requires of the set of RPMs. It shows the cross references by the way of hypertext links. The second point will only be efficient if the actual number of indexed RPMs is important. Each configuration file is handled independently as if it was a new invocation of rpm2html. A configuration file represents a list of directories and a ditribution as a whole. All the references between packages listed in the directories of a single config file are marked by hyperlinks in the resulting HTML files. Here is the process leading to the creation of the HTML pages: 1/ The configuration file is parsed, it sets all the default values for rpm2html. Then all the directory entries are parsed and a list of directories to scan is built. 2/ For each directory, the RPM are scanned, the HTML page describing the package is generated immediately.All ressources provided and needed by the RPM file are stored in a list of ressources. A list of parsed RPMs is also constructed. 3/ Once all the RPM for this config file have been scanned all ressources are dumped in ressources files with links to the RPM providing them (one could also add the RPM needing them but everything needs libc for example). 4/ The sorted lists of packages are generated by sorting the RPM list for various criteria and general front-end pages are generated unsing the new list order. 5/ The main page is generated with links to the various front-end pages, statistics and description of the packages analyzed. 6/ All the lists are freed and global variables are reset. rpm2html is now ready to handle the next configuration file. CONFIGURATION
A configuration file a text file, lines beginning with semicolumns are comments. The first part is a global section defining some important parameters of rpm2html. Parameters are defined with the syntax: variable=value Values shouln't be quoted and end up with the end of line The folowing variables are supported: maint The maintainer of the local mirror, NEEDED ! mail The E-mail of the maintainer, NEEDED ! dir The directory for for the HTML output, NEEDED ! url The URL for the HTML files on the WWW server host The hostname for the server. After these variables, one section should be filled for each directory on your system containing RPM files. It starts with the directory filename between brackets: [The name between brackets is the directory, NEEDED !] The special directory name [localbase] extract information from the RPM base of installed software instead of listing a directory. It allows to dump HTML pages for the installed RPM base on a machine. All the variables defined below until the next directory or the end of file pertain to this directory. Here are the possible variables: name A significant name for this mirror, NEEDED ! ftp The original FTP/HTTP url, NEEDED ! ftpsrc Where the associated sources are stored color Background color for pages trust Unused yet url The local FTP/HTTP url. It is possible to indicate other mirrors by adding some mirror=value lines withing the section. The first one will be considered the local one. EXAMPLE
Example of configuration files: ; ; Sample configuration file for rpm2html ; maint=Joe mail=joe@mydistrib.org dir=/home/http/html/MyDistrib url=/Mydistrib tree=true rdf=true rdf_dir=/home/ftp/pub/mydistrib/RDF [/MyDistrib/RPM/noarch] name=Arch independent packages for MyDistrib ftp=ftp://ftp.mydistrib.org/pub/mydistrib/noarch subdir=noarch [/MyDistrib/RPM/i386] name=i386 packages for MyDistrib ftp=ftp://ftp.mydistrib.org/pub/mydistrib/i386 ftpsrc=ftp://ftp.mydistrib.org/pub/mydistrib/srcs color=#e0ffff subdir=i386 mirror=ftp://ftp.mydistrib.org/pub/mydistrib/i386 mirror=ftp://ftp.elsewhere.org/pub/mydistrib/i386 [/MyDistrib/RPM/alpha] name=Alpha packages for MyDistrib ftp=ftp://ftp.mydistrib.org/pub/mydistrib/alpha ftpsrc=ftp://ftp.mydistrib.org/pub/mydistrib/srcs color=#ffe0ff subdir=alpha mirror=ftp://ftp.mydistrib.org/pub/mydistrib/alpha mirror=ftp://ftp.elsewhere.org/pub/mydistrib/alpha [/MyDistrib/RPM/sparc] name=Sparc packages for MyDistrib ftp=ftp://ftp.mydistrib.org/pub/mydistrib/sparc ftpsrc=ftp://ftp.mydistrib.org/pub/mydistrib/srcs color=#ffffe0 subdir=sparc [/MyDistrib/RPM/ppc] name=PPC packages for MyDistrib ftp=ftp://ftp.mydistrib.org/pub/mydistrib/ppc ftpsrc=ftp://ftp.mydistrib.org/pub/mydistrib/srcs color=#e0ffe0 subdir=ppc mirror=ftp://ftp.mydistrib.org/pub/mydistrib/ppc mirror=ftp://ftp.pear.com/pub/mydistrib/ppc OPERANDS
The following operands are supported: files List of configuration files EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. SEE ALSO
rpm(1), 22 Feb 1998 rpm2html(1)
All times are GMT -4. The time now is 06:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy