Sponsored Content
Full Discussion: copying files with wildcards
Top Forums UNIX for Dummies Questions & Answers copying files with wildcards Post 302598900 by Corona688 on Wednesday 15th of February 2012 04:38:28 PM
Old 02-15-2012
Quote:
Originally Posted by methyl
This should be be more robust:
Code:
/home/jgold/smwcv/error_infect/test/surfaces/threestage/
find . -type f -name "kl*" -print | while read filename
do
       cp -p "${filename}" /home/jgold/tmp
done

That will flatten any directories it finds! All files will end up dumped in one big folder.
This User Gave Thanks to Corona688 For This Post:
 

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
MIWM(1) 						      General Commands Manual							   MIWM(1)

NAME
miwm - a minimal appearance, full-function window manager SYNOPSIS
miwm DESCRIPTION
MIWM is Ben Wise's MInimal Window Manager. It is pronounced 'my whim'. The goal of miwm is to be a fully functional window manager, while retaining a very spare (Zen or Spartan, as you please) appearance and command-set. WARNING
This man page is VERY MUCH under construction. It is not complete, and blatantly contains leftover pieces of the man page I used as a tem- plate. Do not rely on anything you find here. COMMANDS
The notation for describing commands is that Mouse-1-frame means 'button 1 click on frame', C-Mouse-3-root means 'control button 3 click on root', Mouse-1-frame Raise. Mouse-2-frame Move. Mouse-2-root Select virtual workspace. Mouse-3-frame Hide. Filenames passed to miwm can be directories or deleted files. If a directory that is not deleted is passed to miwm, then the deleted files or directo- ries in it will be restored; if the recursive option is specified, then all deleted files or directories in any of its children will be restored as well. The shell wildcards * and ?, as well as shell brace notation using [ and ], are interpreted correctly by miwm. It is possible to pass wildcards to the program without the wildcards being intercepted by the shell by setting noglob (in csh) or by quoting the wildcards. To delete a file that actually has a wildcard in its name, you must precede the quoted wildcard with a quoted backslash. If no files are specified on the command line, miwm goes into interactive mode. In interactive mode, the user is prompted to enter files to be restored, one file per line. Typing a carriage return on an empty prompt line exits the program. Wildcards and quoting backslashes can be entered directly at the prompt without any shell interference (which is the main reason there is an interactive mode). OPTIONS
Miwm No command-line options. KNOWN BUGS
The code is too complicated. No icon support. SEE ALSO
9wm(1), aewm(1) AUTHOR
Ben Paul Wise RESTRICTIONS
Copyright (c) 1998-2003 by Ben Paul Wise. All rights reserved. MIWM(1) specifies the terms and conditions for redistribution. Ben Paul Wise 06 May 2003 MIWM(1)
All times are GMT -4. The time now is 10:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy