Sponsored Content
Top Forums Shell Programming and Scripting Problem in copy files to a folder Post 302594293 by Ananthdoss on Tuesday 31st of January 2012 03:04:42 AM
Old 01-31-2012
Problem in copy files to a folder

Hi all,
Code:
  cp -r /tmp/Agent/* /apps/opt/Agent/TEST

When I copy files under /tmp/Agent using this command Files are getting copied to Agent folder also but I need only in the TEST folder.

Is there any way to fix this issue??\

Thanks in advance
Ananth

Last edited by Franklin52; 01-31-2012 at 05:00 AM.. Reason: Please use code tags for code and data samples, thank you
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to copy one folder to another with existing files

For example, /tmp/folder1 includes /tmp/folder1/a /tmp/folder1/b /tmp/folder2 includes /tmp/c Is there a command without removing files in /tmp/folder2 first to copy the /tmp/folder1 to /tmp/folder2? and the result should be /tmp/folder2 will include only /tmp/folder2/a... (2 Replies)
Discussion started by: lalelle
2 Replies

2. UNIX for Advanced & Expert Users

Auto copy for files from folder to folder upon instant writing

Hello all, I'm trying to accomplish that if a file gets written to folder /path/to/a/ it gets automatically copied into /path/to/b/ the moment its get written. I thought of writing a shell script and cron it that every X amount of minutes it copies these files over but this will not help me... (2 Replies)
Discussion started by: Bashar
2 Replies

3. Shell Programming and Scripting

Find all text files in folder and then copy to a new folder

Hi all, *I use Uwin and Cygwin emulator. I´m trying to search for all text files in the current folder (C/Files) and its sub folders using find -depth -name "*.txt" The above command worked for me, but now I would like to copy all found text files to a new folder (C/Files/Text) with ... (4 Replies)
Discussion started by: cgkmal
4 Replies

4. Shell Programming and Scripting

Copy files from folder and rename them

hello, I need to build a shell script that receives the folder to copy by parameter and copy all files except thumb.db to another folder and rename them like, file.jpg renamed to file_bb1.jpg. can someone help me Thanks (4 Replies)
Discussion started by: zeker
4 Replies

5. Shell Programming and Scripting

copy all files with the same filenames as those in another folder

Hi, all: I've got two folders, folder A contains some image files (say, 100 files) in .jpg format; folder B contains all description files (say, 500 files) in .txt format. All image files in folder A are able to find their corresponding description files in folder B. That is to say,... (3 Replies)
Discussion started by: jiapei100
3 Replies

6. Shell Programming and Scripting

Copy all zipped files from one folder to another

Hi everyone, when I try to copy *.gz files run cp within the correct source folder it works as follow: Source folder = C:/Documents and Settings/user/Recent papers/2771/ Destination folder = C:/Documents and Settings/user/My documents/1532/temp cp *.gz "C:/Documents and Settings/user/My... (2 Replies)
Discussion started by: cgkmal
2 Replies

7. UNIX for Dummies Questions & Answers

Copy files from unknown sub-folder

Hi, I want to copy files from a unknown sub-folder to other sub-folder without copying the sub-folder. I tried the command: find . -name Results*.pdf | cp *.* /home/dario/Desktop/ but i always copy the subfolder. Can anybody help? (5 Replies)
Discussion started by: limadario
5 Replies

8. UNIX for Dummies Questions & Answers

How to copy files to one folder?

Hi , I have a file like this, i need to trace its path and copy the files from its path to one folder. I need to replace elib.com,melib.com to F:\.Here i need to copy to a folder called image. Please help http://elib.com/SHC/NLNLHB/020001498.pdf ... (4 Replies)
Discussion started by: umapearl
4 Replies

9. UNIX for Dummies Questions & Answers

Copy files to folder.

Hi, I have a folder which contains some files like this. bin.000001 bin.000002 bin.000003 bin.000004 bin.000005 bin.000129 bin.index I want to copy all these files to a new folder except the last files. Please provide some ideas. Please use next time code tags for your code... (6 Replies)
Discussion started by: arijitsaha
6 Replies

10. Shell Programming and Scripting

How to copy files with the same filenames as those in another folder to that same folder?

Hello All A similar question like this was asked before but I need to change part of the question. I've two folders, Folder A contains some image files in 150 subfolders; Folder B contains text files in 350 subfolders. All image files in Folder A have the same filename as the text... (5 Replies)
Discussion started by: chlade
5 Replies
Agent::Channel(3pm)					User Contributed Perl Documentation				       Agent::Channel(3pm)

NAME
Log::Agent::Channel - ancestor class for all Log::Agent channels SYNOPSIS
@Log::Agent::Channel::XXX::ISA = qw(Log::Agent::Channel); DESCRIPTION
The "Log::Agent::Channel" class is the root class from which all "Log::Agent" channels inherit. It is a deferred class, meaning that it cannot be instantiated directly. All the deferred routines need to be implemented by its heirs to form a valid driver. Internally, the various "Log::Agent::Driver" objects create "Log::Agent::Channel" instances for each logging channel defined at driver creation time. The channels are therefore architecturally hidden within "Log::Agent", since this module only provides redefined mappings for the various logxxx() routines (logerr(), logwarn(), logdie(), etc...). However, this does not mean that channel classes cannot be used externally: the "Log::Agent::Logger" extension makes "Log::Agent::Channel" objects architecturally visible, thereby offering an application-level logging API that can be redirected to various places transparently for the application. CHANNEL LIST
The following channels are currently made available by "Log::Agent". More channels can be defined by the "Log::Agent::Logger" extension: Log::Agent::Channel::File This channel writes logs to files, defined by their path or via a magical opening sequence such as "|cmd". See Log::Agent::Channel::File. Log::Agent::Channel::Handle This channel writes logs to an already opened descriptor, as specified by its file handle: an IO::Handle object, or a GLOB reference such as *FILE. See Log::Agent::Channel::Handle. Log::Agent::Channel::Syslog This channel redirects logs to the syslogd(8) daemon, which will then handle the dispatching to various logfiles, based on its own configuration. See Log::Agent::Channel::Syslog. INTERFACE
You need not read this section if you're only using "Log::Agent". However, if you wish to implement another channel, then this section might be of interest. The following routines are deferred and therefore need to be defined by the heir: write($priority, $logstring) Emit the log entry held in $logstring, at priority $priority. A trailing " " is added to the $logstring, if needed (i.e. if the physical entity does not do it already, like syslog does). The $priority argument must be a valid syslog priority, i.e. one of the following strings: "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug". The $logstring may not really be a plain string. It can actually be a Log::Agent::Message object with an overloaded stringification routine, so the illusion should be complete. close Close the channel. make This is the creation routine. Its signature varies for each channel, naturally. AUTHOR
Raphael Manfredi <Raphael_Manfredi@pobox.com> SEE ALSO
Log::Agent::Channel::File(3), Log::Agent::Channel::Handle(3), Log::Agent::Channel::Syslog(3), Log::Agent::Logger(3). perl v5.10.0 2002-03-09 Agent::Channel(3pm)
All times are GMT -4. The time now is 01:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy