I need to move a bunch of files into folders that have the same name. I wanted to either do this with some filter command or some type of batch file that I could save that would already include all of the mv commands since I will have to do this process often. Whatever method you think is easier.
... (7 Replies)
I want a script that will move everything beyond a certain line number or beyond a certain content word into another file.
For example, if file A has this:
first line
second line
third line
forth line
fifth line
sixth line
I want to run a script that will move everything beyond the third... (4 Replies)
Move all files starting with a specific name to different directory.
This shell script program should have three parameters
File Name
Source Directory
Destination Directory
User should be able to enter ‘AB_CD*' in file name parameter. In this case all the files starting with AB_CD will... (1 Reply)
Hi All,
I am creting archive script in which i need to split the source file's to different target folder's based on the input file name first character.
Input1.txt -- will contains file names that are needs to be Archive.
Input1.txt
A1213355
B2255666
C2254555
A6655444
C5566445
... (2 Replies)
I have the following files in the dir /home/krishna/datatemp
abc.xml
cde.xml
asfd.txt
asdf_20120101-1.xml
asdf_20120101-2.xml
asdf_20120101-3.xml
asdf_20120101-4.xml
Now I need to move the files having the pattern asdf_20120101-*.xml to the dir /home/krishna/dataout with the extn as... (1 Reply)
Hi All,
I want to move the files in to different folders based on the files month in the file timestamp.
For example
All the september files in the directory should moves into the folder "sep_bkp_files" , August files in to aug_bkp_files folder...
Please help me to achive the above... (10 Replies)
Hello all,
I would appreciate any help to write a script. I have folder A which contains over 30 thousands xml files, I would like create multiple folders and move those files (500 in each folders).
Thank you (1 Reply)
I have a directory /home/cmccabe/nfs/exportedReports that contains multiple folders in it. The find writes the name of each folder to out.txt. A new directory is then created in a new location /home/cmccabe/Desktop/NGS/API, named with the date. What I am trying to do, unsuccessfully at the moment,... (7 Replies)
Hello all,
do you know any way i can i move folders and its content if folder is older than 1,5 days in bash?
I tried:
find /home/xyz/DATA/* -type d -ctime +1.5 -exec mv "{}" /home/xyz/move_data_here/ \;All i got was that Files from DATA /home/xyz/DATA/* ended messed up in... (1 Reply)
Discussion started by: ZerO13
1 Replies
LEARN ABOUT DEBIAN
log::agent::channel::handle
Agent::Channel::Handle(3pm) User Contributed Perl Documentation Agent::Channel::Handle(3pm)NAME
Log::Agent::Channel::Handle - I/O handle logging channel for Log::Agent
SYNOPSIS
require Log::Agent::Channel::Handle;
my $driver = Log::Agent::Channel::Handle->make(
-prefix => "prefix",
-stampfmt => "own",
-showpid => 1,
-handle => *FILE,
);
DESCRIPTION
The handle channel performs logging to an already opened I/O handle, along with the necessary prefixing and stamping of the messages.
The creation routine make() takes the following arguments:
"-handle" => handle
Specifies the I/O handle to use. It can be given as a GLOB reference, such as "*FILE", or as an "IO::Handle" object.
NOTE: Auto-flushing is not enabled on the handle. Even when the channel is closed, the handle is left as-is: we simply stop sending
log messages to it.
"-no_newline" => flag
When set to true, never append any "
" (on Unix) or "
" (on Windows) to log messages.
Internally, Log::Agent relies on the channel to delimit logged lines appropriately, so this flag is not used. However, it might be
useful for "Log::Agent::Logger" users.
Default is false, meaning newline markers are systematically appended.
"-no_prefixing" => flag
When set to true, disable the prefixing logic entirely, i.e. the following options are ignored completely: "-prefix", "-showpid",
"-no_ucfirst", "-stampfmt".
Default is false.
"-no_ucfirst" => flag
When set to true, don't upper-case the first letter of the log message entry when there's no prefix inserted before the logged line.
When there is a prefix, a ":" character follows, and therefore the leading letter of the message should not be upper-cased anyway.
Default is false, meaning uppercasing is performed.
"-prefix" => prefix
The application prefix string to prepend to messages.
"-showpid" => flag
If set to true, the PID of the process will be appended within square brackets after the prefix, to all messages.
Default is false.
"-stampfmt" => (name | CODE)
Specifies the time stamp format to use. By default, my "own" format is used. See Log::Agent::Stamping for a description of the
available format names.
You may also specify a CODE ref: that routine will be called every time we need to compute a time stamp. It should not expect any
parameter, and should return a string.
CAVEAT
Beware of chdir(). If your program uses chdir(), you should always specify logfiles by using absolute paths, otherwise you run the risk of
having your relative paths become invalid: there is no anchoring done at the time you specify them. This is especially true when
configured for rotation, since the logfiles are recreated as needed and you might end up with many logfiles scattered throughout all the
directories you chdir()ed to.
AUTHOR
Raphael Manfredi <Raphael_Manfredi@pobox.com>
SEE ALSO Log::Agent::Logger(3), Log::Agent::Channel(3).
perl v5.10.0 2002-03-09 Agent::Channel::Handle(3pm)