Sponsored Content
Top Forums UNIX for Dummies Questions & Answers copy multiple files in different directories Post 302111959 by ken2834 on Friday 23rd of March 2007 02:36:52 PM
Old 03-23-2007
copy multiple files in different directories

I have a report file that is generated every day by a scheduled process.
Each day the file is written to a directory named .../blah_blah/Y07/MM-DD-YY/reportmmddyy.tab

I want to copy all of this reports to a separate directory without having to do it one by one.

However, if I try

cp .../blah_blah/Y07/*/report*.tab /new_directory/report*.tab

I get "cannot create /new_directory/report*.tab: no such file or directory"

however,

ls .../blah_blah/Y07/*/report*.tab

displays all the files I want to copy.

How do I do this? Thanks.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copy single file to multiple directories

Please help - I need to copy a single file to multiple directories. Dir structure: Parent_Directoy Filename1 Child_Directory1 Child_Directory2 Child_Directory3 Child_Directory4 .... So I need to copy Filename1 to all of the... (2 Replies)
Discussion started by: kthatch
2 Replies

2. UNIX for Dummies Questions & Answers

Copy Directories excluding files

Hi guys, I want to copy folder and sub folders only. I don't want the files. If i use cp -r command it will copy entirely with files. Could any one suggest me. Thanks in advance (1 Reply)
Discussion started by: karthik82
1 Replies

3. UNIX for Dummies Questions & Answers

how can i copy those files into other directories have the same name

how can i copy those files into other directories have the same name but different in the end i have files in directory called test: 10_10_asdadfsdfad.txt 10_10_11_asdawqefwkjasd.txt 10_10_11_12_asdafjjhoqwd.txt i want to put them in exist directory thart i have on my system i have... (1 Reply)
Discussion started by: t17
1 Replies

4. Shell Programming and Scripting

Copy one folder to multiple directories

Hello, I have a small question and i hope someone can help me, if i have 200 domains directories in my server under this directory something like now how i can copy one folder i have to this directories? Thank You (5 Replies)
Discussion started by: GamGom
5 Replies

5. Shell Programming and Scripting

Copy files from multiple directories into one directory without overwriting them

I have several directories and all those directories have .dat files in them. I want to copy all those .dat files to one directory say "collected_directory" The problem is I don't want to overwrite files. So, if two file names match, I don't want the old file to be overwritten with a new one. ... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

6. Shell Programming and Scripting

perform 3 awk commands to multiple files in multiple directories

Hi, I have a directory /home/datasets/ which contains a bunch (720) of subdirectories called hour_1/ hour_2/ etc..etc.. in each of these there is a single text file called (hour_1.txt in hour_1/ , hour_2.txt for hour_2/ etc..etc..) and i would like to do some text processing in them. Each of... (20 Replies)
Discussion started by: amarn
20 Replies

7. Shell Programming and Scripting

Copy files/directories excluding multiple paterns

my directory structure is like below: basedir\ p.txt q.htm r.java b\ abc.htm xyz.java c\ p.htm q.java rst.txt my requirement is i want to copy all the files and directories... (0 Replies)
Discussion started by: ajayyadavmca
0 Replies

8. UNIX for Dummies Questions & Answers

copy file using unix in multiple directories

Hi All Genious, I want to copy a file name XYZ .In a directory /HOME/dir/IXOS1/dir1 which contain multiple directories named not in pattern want to copy the XYZ in all of the directories available on path /HOME/dir/IXOS1/dir1 . Thanks in advance . (2 Replies)
Discussion started by: mumakhij
2 Replies

9. Shell Programming and Scripting

Copy files in respective directories

Hi Guys, I need to copy the files to respective directories based on name of the file. My script is something like below con=$1 for file in `cat $con` do file_tmp=$(ls -t1 $path| grep -i $file | head -n 1) echo $file_tmp if then cp $path$file_tmp $DIR/ap if then... (16 Replies)
Discussion started by: Master_Mind
16 Replies

10. UNIX for Beginners Questions & Answers

How to copy particular files from a multiple directories and paste in a new directory?

Dear all I have a multiple directories, say for example org1, org2, org3 ..... org100 and each directory having a file namely dnaG.fasta. I need to copy all the dnaG.fasta file from each directory and paste in another directory fastconcatg. Therefore, my script has to copy dnaG.fasta file from... (5 Replies)
Discussion started by: dineshkumarsrk
5 Replies
LIRE.IN(1)						  LogReport's Lire Documentation						LIRE.IN(1)

NAME
lire - Lire interface SYNOPSIS
lire DESCRIPTION
lire has two purposes: it configures Lire, and it enables automatic report generation. lire is a menu driven application. You should use the TAB key to navigate across the various interface elements. The arrow keys should be used to navigate menus. The main menubar can be accessed at all times using F10. The mouse might be available depending on your terminal and the implementation of the Curses::UI module of your system. configuring Lire The 'Preferences' menu item in the 'Lire' menu will give you access to all the Lire settings. The lire command edits or creates ~/.lire/config.xml. automatic report generation lire enables automatic report generation by creating and managing DLF stores. A DLF store is a log repository. In a DLF store, you can configure ImportJobs and ReportJobs that will be executed regularly. Store configuration is saved in store/config.xml. An ImportJob is a job that will import log data into the DLF store. This data will be used later to generate the reports. ReportJobs should be used to generate periodical reports. Reports are generated from the DLF streams available in your DLF store. The report can be generated for different schedules. Lire supports 5 different schedules: hourly, daily, weekly, monthly and yearly. You will need to select the report configuration file to use for each schedule. Defaults are located in <sysconfdir>/lire/, which you should use as templates that you need to customize according to your purpose. The reports can be generated either from the log data imported in the database or from previously generated daily reports. This is useful when you have lots of log data and you don't want to keep all the raw data available. The source is selected automatically based on data availability. You should note however that only 'daily' reports are considered as a data source for other reports (making that possible only with weekly or longer schedules). When executed, a ReportSchedule will only generate the report and save it in the DLF store. If you want to obtain a formatted copy of the report, you will need to configure one or more OutputJobs. Two types of OutputJob are supported: 1- The report can be sent by email to one or more address; 2- or it can saved in a file on the disk. A useful configuration is to generate HTML reports in a directory published on a web site. When using a "file" OutputJob you will probably want to use strftime(3) expansion so that the filename is different each time the report is generated. The most common expansions are: %Y - fou digits year (2000); %m - two-digits month number (01 for january); %V - ISO week number; %d - day of the month number; %H - hour of day (01-23). Also, contrary to the lr_log2report command, HTML reports are generated into a directory (not as a tar file). To run the scheduled jobs, you will need to setup cron jobs. Use lr_cron(1) to process the configured jobs in a store. SEE ALSO
lire(7), lr_cron(1), Lire User's Manual AUTHORS
Francis J. Lacoste <flacoste@logreport.org> Wolfgang Sourdeau <wolfgang@logreport.org> VERSION
$Id: lire.in,v 1.10 2006/07/23 13:16:32 vanbaal Exp $ COPYRIGHT
Copyright (C) 2004 Stichting LogReport Foundation, LogReport@LogReport.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html. Lire 2.1.1 2006-07-23 LIRE.IN(1)
All times are GMT -4. The time now is 12:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy