Sponsored Content
Full Discussion: copy files
Top Forums UNIX for Dummies Questions & Answers copy files Post 302424833 by bluescreen on Wednesday 26th of May 2010 11:20:06 AM
Old 05-26-2010
You may need to use a backslash "\" in front of the asterisk "*" in your $File_Pattern var.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

copy files

Hi, Under the home directory, I want to search for all the *.xml files and move them all into another folder under home. Is it possbile using a single find command . Regards, Chirayu Sutaria (6 Replies)
Discussion started by: chirayus
6 Replies

2. UNIX for Advanced & Expert Users

copy of files

hi all i have a script,which when executed must copy 3 files from a directory on boxA to the same directory on boxB.I'm using scp to copy these files,the problem is out ofthe 3 files only1 is been copied and not the other 2, i have permissons for the files,any ideas are appreciated thnks (2 Replies)
Discussion started by: bkan77
2 Replies

3. SCO

How do you copy files from CD

How do you copy files fra a cd-rom to a directory on the computer? (2 Replies)
Discussion started by: Schnell
2 Replies

4. Shell Programming and Scripting

To copy everything except 2 files

Hi all, I would want to copy everything in a particular directory. However would want to exclude 2 files: DIMStemp01.dbf DIMSts01.dbf I tried to: (1) ls files except these 2 files into abc.txt (2) Read from abc.txt and start copying. It works, however is there any easier way? Eg.... (6 Replies)
Discussion started by: *Jess*
6 Replies

5. UNIX for Dummies Questions & Answers

copy only new files or files of a different size

hello i would like to copy files from 1 location to a nother, but it has only to copy files which are newer or have a different filesize. all has to be logged to a copy.log file (als skipped files should be in the log) is this possible with the cp command (1 Reply)
Discussion started by: arnoldg
1 Replies

6. UNIX and Linux Applications

Copy all files

how i can copy all files " select all " in one step t try command cp -t (2 Replies)
Discussion started by: walidfinder
2 Replies

7. Solaris

How to safely copy full filesystems with large files (10Gb files)

Hello everyone. Need some help copying a filesystem. The situation is this: I have an oracle DB mounted on /u01 and need to copy it to /u02. /u01 is 500 Gb and /u02 is 300 Gb. The size used on /u01 is 187 Gb. This is running on solaris 9 and both filesystems are UFS. I have tried to do it using:... (14 Replies)
Discussion started by: dragonov7
14 Replies

8. Shell Programming and Scripting

how to copy files followed by list of names of all the files in /etc?

....... (2 Replies)
Discussion started by: pcbuilder
2 Replies

9. Red Hat

Unable to copy files due to many files in directory

I have directory that has some billion file inside , i tried copy some files for specific date but it's always did not respond for long time and did not give any result.. i tried everything with find command and also with xargs.. even this command find . -mtime -2 -print | xargs ls -d did not... (2 Replies)
Discussion started by: before4
2 Replies

10. UNIX for Dummies Questions & Answers

Copy files from one drive to another, keeping most recently modified files

Hi all, I am a bit of a beginner with shell scripting.. What I want to do is merge two drives, for example moving all data from X to Y. If a file in X doesn't exist in Y, it will be moved there. If a file in X also exists in Y, the most recently modified file will be moved to (or kept) in... (5 Replies)
Discussion started by: apocolapse
5 Replies
fnmatch(3)						     Library Functions Manual							fnmatch(3)

NAME
fnmatch - Matches filename patterns LIBRARY
Standard C Library (libc.so, libc.a) SYNOPSIS
#include <fnmatch.h> int fnmatch( const char *pattern, const char *string, int flags); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: fnmatch(): XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Contains the pattern to which the string parameter is to be compared. Contains the string to be compared against the pattern parameter. Contains a bit flag specifying the configurable attributes of the comparison to be performed by the fnmatch function. The flags parameter modifies the interpretation of the pattern and string parameters. It is the bitwise inclusive OR (|) of 0 (zero) or more of the following flags, which are defined in the fnmatch.h file. Slash in the string parameter only matches slash in the pattern parameter. Leading period in the string parameter must be exactly matched by period in the pattern parameter. Unless FNM_NOESCAPE is set, preceding a character in pattern with a (backslash character) causes fnmatch() to match that character in string. For example, \ matches a backslash in string. If FNM_NOESCAPE is set, (backslash) is interpreted as an ordinary character. If the FNM_PATHNAME flag is set in the flags parameter, a / (slash) in the string parameter is explicitly matched by a / in the pattern parameter. It is not matched by either the * (asterisk) or ? (question-mark) special characters, nor by a bracket expression. If the FNM_PATHNAME flag is not set, the / is treated as an ordinary character. If FNM_PERIOD is set in the flags parameter, then a leading period in the string parameter only matches a period in the pattern parameter; it is not matched by either the asterisk or question-mark special characters, nor by a bracket expression. A period is determined to be leading according to the setting of the FNM_PATHNAME flag, according to the following rules: If the FNM_PATHNAME flag is set, a period is leading only if it is the first character in the string parameter or if it immediately follows a slash. If the FNM_PATHNAME flag is not set, a period is leading only if it is the first character of the string parameter. If FNM_PERIOD is not set, no special restrictions are placed on matching a period. A (backslash character) quotes the next character, unless FNM_NOESCAPE is set. If FNM_NOESCAPE is set, (backslash) is treated as itself. DESCRIPTION
The fnmatch() function checks the string specified by the string parameter to see if it matches the pattern specified by the pattern param- eter. This routine follows the match criteria of the glob() function. The fnmatch function is useful when a program needs to perform pattern matching, such as when a directory is to be searched for a particu- lar string (as is the case with the find command). A program like the pax command can also use the fnmatch() function to perform its pat- tern matching operations. RETURN VALUES
If the value in the string parameter matches the pattern specified by the pattern parameter, then the fnmatch() function returns 0 (zero). If there is no match, the fnmatch() function returns FNM_NOMATCH, which is defined in the fnmatch.h file. If an error occurs, the fnmatch() function returns a nonzero value. RELATED INFORMATION
Functions: glob(3), globfree(3), regcomp(3) Standards: standards(5) delim off fnmatch(3)
All times are GMT -4. The time now is 04:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy