actually i have logs files with huge data and they are size based on 500mb new log file generated.
to coy those files for troubleshotting is very difficult.
my log files contains data from a month for example. now customer wants to create a utility where he can give FROM date and TO date and only logs between these two dates are copied to new files. there are several files with different name. thats my next challenge to have the new files with same name but as of now i need the specific date logs.
i tried last 2 days files and that worked but if i want logs from 15-sep to 16-sep then its issue.
sample logs :
Last edited by Franklin52; 10-08-2014 at 11:31 AM..
Reason: Please use code tags
Hi,
I'm trying to accomplish the following and would like some suggestions or possible bash script examples that may work
I have a directory that has a list of log files that's periodically dumped from a script that is crontab that are rotated 4 generations. There will be a time stamp that is... (4 Replies)
How to copy files from a location to a directory <YYMM> based on last modification date? This will need to run daily.
I want to copy those file for May to 0905 and Jun to 0906.
Appreciate your guidance.:) Thanks.
-rw-rw-rw- 1 ttusr tgrp 4514 May 29 21:49 AB24279J.lot_a... (17 Replies)
Hi all
i am having so many files in my directory.Is there any option
to copy files based on date.
example
i am having file this
-rw-rw-r-- 1 ram user 1 Feb 2 17:12 abc
-rw-rw-r-- 1 ram user 1 Feb 2 17:12 bnw
-rwxrwxr-x 1 ram user 21122 Feb 4... (3 Replies)
Hi, I have a requirement to copy files from a windows network drive to a Linux server using shell script based on the last created date.
Ex:
FileName CreatedDate/Time
F1 05-01-2012 3:00 PM
F2 05-01-2012 3:15 PM
F3 05-01-2012 2:00 PM
When i run the shell script... (1 Reply)
Hi All,
I am new to shell srcipting.
Problem :
I need to write a script which copy the log files from /prod/logs directory based on todays date like (Jul 17) and place it to /home/hzjnr0 directory and then search the copied logfiles for the string "@ending successfully on Thu Jul 17". If... (2 Replies)
I have file listed like below
-rw-r--r--+ 1 test test 17M Nov 26 14:43 test1.gz
-rw-r--r--+ 1 test test 0 Nov 26 14:44 test2.gz
-rw-r--r--+ 1 test test 0 Nov 27 10:41 test3.gz
-rw-r--r--+ 1 test test 244K Nov 27 10:41 test4.gz
-rw-r--r--+ 1 test test 17M Nov 27 10:41 test5.gz
I... (5 Replies)
My unix version is IBM AIX Version 6.1
I tried google my requirement and found the below answer,
find . -newermt “2012-06-15 08:13" ! -newermt “2012-06-15 18:20"
But newer command is not working in AIX version 6.1 unix
I have given my requirement below:
Input:
atr files:
... (1 Reply)
HI,
Can anyone tell me how to pull the date and file name separated by a space using the find command or any other command. I want to look through several directories and based on a date timeframe (find -mtime -7), output the file name (without the path) and the date(in format mmddyyyy) to a... (2 Replies)
Can someone draw up a script that for every file, folder and subfolder and files that will copy the creation date over top of the modified date??
I know how to touch every file recursively, but no idea how to read a files creation date then use that to touch the modification date of that file,... (3 Replies)
Hi Team,
I'm new to unix and i have a requirement to copy or move files from one directory to another based on current date mentioned in the .zip file name. Note that i need to copy only the recent zip file. please help me with the code
i tried the code as:
#! /usr/bin/sh
find... (3 Replies)
Discussion started by: midhun3108
3 Replies
LEARN ABOUT DEBIAN
net::dbus::error
Net::DBus::Error(3pm) User Contributed Perl Documentation Net::DBus::Error(3pm)NAME
Net::DBus::Error - Error details for remote method invocation
SYNOPSIS
package Music::Player::UnknownFormat;
use base qw(Net::DBus::Error);
# Define an error type for unknown track encoding type
# for a music player service
sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
my $self = $class->SUPER::new(name => "org.example.music.UnknownFormat",
message => "Unknown track encoding format");
}
package Music::Player::Engine;
...snip...
# Play either mp3 or ogg music tracks, otherwise
# thrown an error
sub play {
my $self = shift;
my $url = shift;
if ($url =~ /.(mp3|ogg)$/) {
...play the track
} else {
die Music::Player::UnknownFormat->new();
}
}
DESCRIPTION
This objects provides for strongly typed error handling. Normally a service would simply call
die "some message text"
When returning the error condition to the calling DBus client, the message is associated with a generic error code or
"org.freedesktop.DBus.Failed". While this suffices for many applications, occasionally it is desirable to be able to catch and handle
specific error conditions. For such scenarios the service should create subclasses of the "Net::DBus::Error" object providing in a custom
error name. This error name is then sent back to the client instead of the genreic "org.freedesktop.DBus.Failed" code.
METHODS
my $error = Net::DBus::Error->new(name => $error_name, message => $description);
Creates a new error object whose name is given by the "name" parameter, and long descriptive text is provided by the "message"
parameter. The "name" parameter has certain formatting rules which must be adhered to. It must only contain the letters 'a'-'Z',
'0'-'9', '-', '_' and '.'. There must be at least two components separated by a '.', For example a valid name is
'org.example.Music.UnknownFormat'.
$error->name
Returns the DBus error name associated with the object.
$error->message
Returns the descriptive text/message associated with the error condition.
$error->stringify
Formats the error as a string in a manner suitable for printing out / logging / displaying to the user, etc.
AUTHOR
Daniel P. Berrange
COPYRIGHT
Copyright (C) 2005-2011 Daniel P. Berrange
SEE ALSO
Net::DBus, Net::DBus::Object
perl v5.14.2 2011-06-30 Net::DBus::Error(3pm)