copying files with wildcards


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers copying files with wildcards
# 8  
Old 02-15-2012
A sample directory listing goes a long way.
I was influenced by the "find -type f", though that could be a red herring.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Copying files

I'm trying to do this exact same thing, so far I have created this to move files i've named my script CP.sh #!/bin/bash cd /root/my-documents/NewDir/ for f in *.doc do cp -v $f root/my-documents/NewDir $f{%.doc} done When i go to run this in the console i type, bin/sh/ CP.sh but it... (7 Replies)
Discussion started by: MKTM_93_SIMP
7 Replies

2. Shell Programming and Scripting

Copying files

All, I need to grab and rename common files from several unique directory structures. For example, the directory structures looks like: /unique_dir/common/common/common/person_name_dir/common_file.txt There are over 90,000 of these text files that I'd like to put in a single directory as... (5 Replies)
Discussion started by: hburnswell
5 Replies

3. Shell Programming and Scripting

Files copying - [ Listed files alone. ] - Shell script

Hi All, I am doing this for svn patch making. I got the list of files to make the patch. I have the list in a file with path of all the files. To Do From Directory : /myproject/MainDir To Directory : /myproject/data List of files need to copy is in the file: /myproject/filesList.txt ... (4 Replies)
Discussion started by: linuxadmin
4 Replies

4. Shell Programming and Scripting

Copying Files

Hi All, I'm trying to list some files from my log directory and files are like this log.20110302_20.gz log.20110302_21.gz log.20110302_22.gz log.20110302_23.gz log.20110303_00.gz log.20110303_01.gz log.20110303_02.gz ............ log.20110311_22.gz log.20110311_23.gz... (2 Replies)
Discussion started by: thelakbe
2 Replies

5. Shell Programming and Scripting

Perl, open multiple files with wildcards

I have a question regarding Perl scripting. If I want to say open files that all look like this and assign them to a filehandle and then assign the filehandle to a variable, how do I do this? The file names are strand1.fa.gz.tmp strand2.fa.gz.tmp strand3.fa.gz.tmp strand4.fa.gz.tmp ...... (6 Replies)
Discussion started by: japaneseguitars
6 Replies

6. Shell Programming and Scripting

rename multiple files with wildcards

Hi All I am having hundred over file in the below pattern. AA050101.INI BB090101.INI . . ZX980101.INI Need to rename these files with an extension .bak AA050101.INI.bak BB090101.INI.bak . . ZX980101.INI.bak (5 Replies)
Discussion started by: karthikn7974
5 Replies

7. UNIX for Advanced & Expert Users

copying of files by userB, dir & files owned by userA

I am userB and have a dir /temp1 This dir is owned by me. How do I recursively copy files from another users's dir userA? I need to preserve the original user who created files, original group information, original create date, mod date etc. I tried cp -pr /home/userA/* . ... (2 Replies)
Discussion started by: Hangman2
2 Replies

8. Shell Programming and Scripting

copying files

hi I want to copy all files from the current directory and move to .archive file. Moreover,I want to add .bak to each file name, that will be copied. How can I do that? (4 Replies)
Discussion started by: tjay83
4 Replies

9. Shell Programming and Scripting

Using cat to combine files using wildcards

How do I use cat (presumably with a sh script) to combine all the files in a directory without listing them individually. Thank you for your patience with this very elementary question.:) (3 Replies)
Discussion started by: Enobarbus37
3 Replies

10. UNIX for Dummies Questions & Answers

Move files using wildcards ???

Hi all, Would like to rename all files using wildcards - if at all possible! As an example I have the following files: Nov01_df Nov02_df Nov03_df ...... Nov28_df Nov29_df Nov30_df I'd like to have these renamed as "df??" where ?? is the number from the original file name. Any... (5 Replies)
Discussion started by: Cameron
5 Replies
Login or Register to Ask a Question
FTFF(1) 						      General Commands Manual							   FTFF(1)

NAME
ftff - fault tolerant file find utility SYNOPSIS
ftff [-#fFhIpq][-t#][start_directory] file_to_find DESCRIPTION
ftff recursively descends the directory hierarchy and reports all objects in the file system with a name that approximately matches the given filename. ftff achieves fault tolerance by calculating the so called Weighted Levenshtein Distance. The Levenshtein Distance is defined as the minimum number of character insertions, deletions and replacements that transform a string A into a string B. ftff behaves like 'find start_directory -name file_to_find -print' with the following differences: - ftff is fault tolerant - ftff is NOT case sensitive - the level of fault tolerance can be adjusted by specifying the optional parameter tolerance. A tolerance of 0 specifies exact match. OPTIONS
-h Prints a little help/usage information. -f Follow symbolic links on directories. Note: a symbolic link like "somewhere -> .." causes naturally an endless loop. By default ftff does not follow symbolic links to directories. -F Classify the file type by appending a character to each file name. This character is: '*' for regular files that are executable '/' for directories '@' for symbolic links '|' for FIFOs '=' for sockets -p print the actual distance value in front of the filename. This value is equal to the number of insertions, deletions and replace- ments necessary to transform the file that was found into the search key (the file_to_find). -q keep quiet and do not print any warning about non readable directories. -# or -t# Set the fault tolerance level to #. The fault tolerance level is an integer in the range 0-255. It specifies the maximum number of errors permitted in finding the approximate match. The default tolerance is (strlen(searchpattern) - number of wildcards)/6 + 1 -I Do case sensitive search (default is case in-sensitive) file_to_find The filename to search for. '*' and '?' can be used as wildcards. '?' denotes one single character. '*' denotes an arbitrary number of characters. start_directory The directory to start the search. The current directory is the default. The last argument to ftff is not parsed for options as the program needs at least one file-name argument. This means that ftff -x will not complain about a wrong option but search for the file named -x. EXAMPLE
ftff samething This will e.g. find a file called something or sameting or sum-thing or ... To find all files that start with any prefix, have something like IOComm in between and end on a two letter suffix: ftff '*iocomm.??' To find all files that exactly start with the prefix DuPeg: ftff -0 'dupeg*' BUGS
The wildcards '?' and '*' can not be escaped. These characters function always as wildcards. This is however not a big problem since there is normally hardly any file that has these characters in its name. AUTHOR
Guido Socher (guido@linuxfocus.org) SEE ALSO
whichman(1), find(1) Search utilities August 1998 FTFF(1)