Ftp mget exclusion question


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Ftp mget exclusion question
# 1  
Old 10-19-2010
Ftp mget exclusion question

In the script I am doing a mget for multiple files. How can I exclude just one file which I do not need to ftp ?
# 2  
Old 10-19-2010
Some ftp's do, some don't:

ftp mget exclude - Google Search

---------- Post updated at 04:22 PM ---------- Previous update was at 04:19 PM ----------

You might use lftp mirror:

lftp.1

---------- Post updated at 04:24 PM ---------- Previous update was at 04:22 PM ----------

Or you can list the files, exclude the one you don't want, and generate the get's for every other file name.
# 3  
Old 10-20-2010
If local conditions allow maybe use ftp "rename" command to change the name of the file to not match the pattern in ftp "mget", then rename the file back again afterwards.
# 4  
Old 10-20-2010
Quote:
Originally Posted by methyl
If local conditions allow maybe use ftp "rename" command to change the name of the file to not match the pattern in ftp "mget", then rename the file back again afterwards.
You could even rename it to a different directory and back afterwards.




Of course, if you had freedom to move it out of that directory, you would, I hope! It sounds like a common architectural and security mistake: a directory of unlike files. All these should be in different directories:
  • bought/downloaded files never modified after installation/patch (should never change from distribution),
  • files modified to configure your installation (should never change after installation or reconfiguration) (should also be under some CMS, like SCCS, in another dir, as they change),
  • executables that might be in $PATH (/bin/) (speeds search for executables, may get executed by accident),
  • dynamic libraries (/lib/)if your OS has a separate path var for them like $LD_IBRARY_PATH (speeds search even more, as often, many lib per executable),
  • anything that has a $*PATH variable associated with it, e.g, MANPATH (speeds search BTW, putting local dirs before NFS dirs also speeds PATH search a lot),
  • data in to system, separate current and archive, maybe separate by remote system,
  • data out from system, separate current and archive, maybe separate by remote system,
  • data intermediate to system processes, separate current and archive,
  • temp files, preferebly a dir not shared (name collisions) or volatile (lose evidence needed for prod support) but generally OK to delete,
  • logs, separate current and archive,
  • documentation, by type (/man/, /html/, /info/, /txt/)
  • source code, includes separate from other source (speeds search)separate for make directory (makes cleanup easy, just delete everything and get makefile))
  • source code archives (SCCS,RCS,CVS,SVN,etc.)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

FTP mget will only grab files not folders

Hey All, first post :rolleyes: So I am writting a script to pull down files from an ftp that will be called from a bat file on windows. This seems pretty straight forward, and grabs all of the "files" in the cd location, but I am running into some permission issue that will not allow me to... (1 Reply)
Discussion started by: mpatton
1 Replies

2. Shell Programming and Scripting

[Solved] Prompt problem while using mget to ftp

I am writing a scritp in which first step is to get some files from a server. I am using mget to do that. here is my FTP code ... HOST="XXX.XXX.com" 28 ftp -inv $HOST <<END &> $FTP_LOG 29 quote USER $USER 30 quote PASS $PASWD 31 cd log 32 prompt off 33 binary 34 mget... (0 Replies)
Discussion started by: shashidhar
0 Replies

3. Shell Programming and Scripting

FTP mget * not working after change directory -cd

Hi everyone, I have an Linux FTP script to get files from different AS400 mailboxes and store in different local directories. I had to use mget * option becuase there is no fixed destination file name means filename can change. The following FTP script is working fine if we have single file... (5 Replies)
Discussion started by: oravikiran
5 Replies

4. Shell Programming and Scripting

problem with ftp mget

Hi I am trying to ftp all the files from a directory in server2 to server1 (both unix) The below code is in server1 ftpfile=/home/anitha/ftptxt echo cd mydir >>$ftpfile echo mget *.* >>$ftpfile cat $ftpfile | ftp -i server2 mydir is a directory in server2 and there are some test files in... (4 Replies)
Discussion started by: anijan
4 Replies

5. AIX

ftp mget directory

Hi, I have searched everywhere for an answer to this question but couldn't find one so I ask it here. From an AIX 5.3 machine I ftp to another AIX 5.3 server. I want to get all files and only files in a directory. This directory has a subdirectory with files in it. In ftp, I enter the... (5 Replies)
Discussion started by: bheinsius
5 Replies

6. Shell Programming and Scripting

Ftp-mget

For the below mentioned code..Files are getting transferred from first mget statement alone ie from /home/Arun/*EF01/...Could someone help me regarding this ftp -vn <<EOD >$LOG open user lcd ascii mget /home/Arun/*EF01/GLHEC* mget /home/Arun/*EF03/GLHEC* mget... (3 Replies)
Discussion started by: infernalhell
3 Replies

7. UNIX for Dummies Questions & Answers

Using FTP mget from Visual Basic Shell

Hi calling a batch file with FTP commands from Visual basing with Shell, it basically to copy files then delete them. The delete seems to work but the copy, it looks like the mget command doesn't have the complete information on where to copy the files. Here is the batch file content. Open... (2 Replies)
Discussion started by: Mario120560
2 Replies

8. Shell Programming and Scripting

mget ftp command options

Hi, I am using mget ftp command to pull a bunch of zip files from Windows to local unix machines. It is working fine as follows. -rw------- 1 autosys autosys 614 Aug 19 13:13 02034128.zip -rw------- 1 autosys autosys 1866 Aug 19 13:13 02034127.zip -rw------- 1 autosys ... (1 Reply)
Discussion started by: spatra
1 Replies

9. UNIX for Advanced & Expert Users

mget ftp command options

Hi, I am using mget ftp command to pull a bunch of zip files from Windows to local unix machines. It is working fine as follows. -rw------- 1 autosys autosys 614 Aug 19 13:13 02034128.zip -rw------- 1 autosys autosys 1866 Aug 19 13:13 02034127.zip -rw------- 1 autosys autosys 14592 Aug 19... (1 Reply)
Discussion started by: spatra
1 Replies

10. UNIX for Dummies Questions & Answers

mget (ftp command)

hey, I was wondering if its possible to use a complete path and file name using the mget command example mget /dir1/dir2/dir3/file.ext or get /dir1/dir2/dir3/file.ext because whenever i try its says file not found or permission denied..... but if i do cd dir1 cd dir2 cd dir3 mget... (2 Replies)
Discussion started by: Ganondorf
2 Replies
Login or Register to Ask a Question