Sponsored Content
Full Discussion: copying files with wildcards
Top Forums UNIX for Dummies Questions & Answers copying files with wildcards Post 302598907 by methyl on Wednesday 15th of February 2012 04:54:04 PM
Old 02-15-2012
@Corona688 I quote from post #1:
Quote:
I want to copy all files in the directory that start with the letters kl but have other letters after this initial two letters into another directory.
No mention of subdirectories.

(My reference to "more robust" was of course referring to the examples in post #1).

Quote:
I want to copy all files in the directory that start with the letters kl but have other letters after this initial two letters into another directory.
The more times I read this sentence the more ambiguous it becomes. Is it the filenames which start with "kl" or the directory names which start with "kl" I wonder?
I've gone for the files and Corona688 has gone for the directories.

Last edited by methyl; 02-15-2012 at 06:06 PM..
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
NWTRUSTEE2(1)							    nwtrustee2							     NWTRUSTEE2(1)

NAME
nwtrustee2 - Lists trustees and permissions of a ncp directory SYNOPSIS
nwtrustee2 [ -h ] [ -? ] [ -v ] [ directory ] DESCRIPTION
nwtrustee2 lists the permissions assigned to any trustees for a given ncp directory. It does not show the inherited permissions, but only the ones directly assigned to it. The letters used to express the permissions are explained in the nwgrant(1) manpage. The directory has to belong to a volume mounted with ncpmount or mount.ncp, if omited the current directory is used. OPTIONS
-h or -? -h or -? prints a short help text. -v Verbose mode. Prints the directory name before procesing. SEE ALSO
nwtrustee(1), nwgrant(1), nwrevoke(1), nwrights(1) AUTHORS
nwtrustee2 was written by Petr Vandrovec <vandrove@vc.cvut.cz>. This manual page was written by Maximiliano Curia <maxy@gnuservers.com.ar>. nwtrustee2 10/16/2005 NWTRUSTEE2(1)
All times are GMT -4. The time now is 08:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy