mget * (obtein files from current directory but not the files form sub-directories)


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting mget * (obtein files from current directory but not the files form sub-directories)
# 1  
Old 03-12-2009
mget * (obtein files from current directory but not the files form sub-directories)

Hello,

Using the instruction mget (within ftp) and with "Interactive mode off", I want to get all files from directory (DirAA), but not the files in sub-directories.

The files names don't follow any defined rule, so they can be just letters without (.) period

Directory structure example:
$ find DirAA -name "*"
DirAA
DirAA/FILE_AA_01
DirAA/FILE_AA_02
DirAA/DirBB
DirAA/DirBB/FILE_BB_01

ftp> mget *
local: DirBB/FILE_BB_01 remote: DirBB/FILE_BB_01
DirBB/FILE_BB_01: No such file or directory


With the instruction "mget *" the (* asterisk) is expanded also for the files on the sub-directories. The files from the sub-directories are not copied, but will originate errors on the log.

So anyone knows if with “mget *” there is a way to get only the files on the current directory, not the files on the sub-directories?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

List all files and directories in the current directory separated by commas and sorted by crtime

What I know so far: ls -A will list all files except those starting with a dot ls -d will list all directories ls -m will separate contents by commas For getting crtimes use: stat filename will give me the inode number or ls -i filename will give... (13 Replies)
Discussion started by: chstewar
13 Replies

2. AIX

How to backup a directory (sub-directories/files) files from one server on to other ?

Hello, Server A: /directory1/ Server B: /Backups/ i wanted to backup contents of /directory1 from "server A" on to "Server B" every 1 hour. If there is any change in (only new/differences) contents on serverA (directory1/) supposed to be backeup on next run. I did used rsync command to... (5 Replies)
Discussion started by: System Admin 77
5 Replies

3. UNIX for Advanced & Expert Users

Find all files in the current directory excluding hidden files and directories

Find all files in the current directory only excluding hidden directories and files. For the below command, though it's not deleting hidden files.. it is traversing through the hidden directories and listing normal which should be avoided. `find . \( ! -name ".*" -prune \) -mtime +${n_days}... (7 Replies)
Discussion started by: ksailesh1
7 Replies

4. Shell Programming and Scripting

Find specific files only in current directory...not sub directories AIX

Hi, I have to find specific files only in the current directory...not in the sub directories. But when I use Find command ... it searches all the files in the current directory as well as in the subdirectories. I am using AIX-UNIX machine.Please help.. I am using the below command. And i am... (2 Replies)
Discussion started by: aakishore
2 Replies

5. Shell Programming and Scripting

How to list all the files, directories and sub-directories in the current path except one directory?

Can anyone come up with a unix command that lists all the files, directories and sub-directories in the current directory except a folder called log.? Thank you in advance. (7 Replies)
Discussion started by: Manjunath B
7 Replies

6. Shell Programming and Scripting

compare files in two directories and output changed files to third directory

I have searched about 30 threads, a load of Google pages and cannot find what I am looking for. I have some of the parts but not the whole. I cannot seem to get the puzzle fit together. I have three folders, two of which contain different versions of multiple files, dist/file1.php dist/file2.php... (4 Replies)
Discussion started by: bkeep
4 Replies

7. Shell Programming and Scripting

How to strip ^M at end of each files for all files found in current directory

I am trying to use a loop to strip of the funny character ^M at the end of all lines in each file found in current directory and I have used the following in a script: find . -type f -name '*.txt' | while read file do echo "stripping ^M from ..." ex - "$file" > $tempfile %s/^M//g wq! # mv... (4 Replies)
Discussion started by: bisip99
4 Replies

8. Shell Programming and Scripting

Finding files in current directory when 100,000's files in current directory

Hi All I was wondering what is the most efficient way to find files in the current directory(that may contain 100,000's files), that meets a certain specified file type and of a certain age. I have experimented with the find command in unix but it also searches all sub directories. I have... (2 Replies)
Discussion started by: kewong007
2 Replies

9. UNIX for Dummies Questions & Answers

List files that are not directories from current directory

I can't manage to list all files that are not directories from current directory. (2 Replies)
Discussion started by: beni22sof
2 Replies

10. Shell Programming and Scripting

searching content of files in the current and sub directories

Hi I was wondering why command 2 doesn't work like command 1 below. 1. find . -exec grep "test" '{}' \; -print 2. ls -R | grep "test" I am trying to search "test" from all the files in the current and sub directories. What's wrong with my command 2? Thanks in advance for your help (4 Replies)
Discussion started by: tiger99
4 Replies
Login or Register to Ask a Question
SYSINST(8)						    BSD System Manager's Manual 						SYSINST(8)

NAME
sysinst -- install or upgrade a NetBSD system SYNOPSIS
sysinst [-D] [-f deffile] [-r releasename] DESCRIPTION
sysinst is a menu-based program that may be used to install or upgrade a NetBSD system. It is usually invoked automatically when the system is booted from appropriate installation media. sysinst is usually not present on a NetBSD system that has been fully installed. OPTIONS
-D Switch on debugging. -r releasename Set the releasename if it is different to the one compiled. Currently unused. -f deffile Set a file for definitions other than the defaults. See DEFINITION FILE for its format. DEFINITION FILE
The definition file is used to set several other names and directories to search for. You can specify any of the options in the file. They are stored as: option = value pairs. In this description, REL and MACH are the release and architecture respectively, determined by the image sysinst is used on. option name default value description release REL Release name (also set by -r releasename). machine MACH Machine architecture xfer dir /usr/INSTALL Transfer dir ext dir Extract dir (will usually be set later on) ftp host ftp.NetBSD.org ftp host for fetching files ftp dir pub/NetBSD/NetBSD-REL ftp directory for fetching files ftp prefix /MACH/binary/sets directory to look for sets. Note that this is used for all kinds of fetching (CDs, local FS, ...), not only ftp. ftp user ftp ftp user for connecting ftp pass - ftp password ftp proxy - ftp proxy nfs host - nfs host for fetching via nfs nfs dir /bsd/release nfs directory for fetching files cd dev cd0a name of the CD device for fetching files fd dev /dev/fd0a name of floppy for fetching files local dev - Other device to be mounted for fetching files local fs ffs FS-type for local dev local dir release Directory to look for in the mounted local fs targetroot mount /targetroot Directory to mount target root dir to dist postfix .tgz Suffix of set files to be extracted diskname mydisk disktab(5) diskname to use for target disk SEE ALSO
release(7), afterboot(8), boot(8), diskless(8) <machine>/INSTALL.* files on CD-ROM installation media .../NetBSD-<rel>/<machine>/INSTALL.* files in NetBSD releases or snapshots. HISTORY
A sysinst command appeared in NetBSD 1.3. BSD
September 17, 2011 BSD