02-27-2011
Could you please be more explicit, how do I get the sorting by date?
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I need to perform a non-recursive find in Unix. Sounds simple, but it doesn't actually work. The command ALWAYS searches through the subdirectories.
Any ideas? I am on DEC Unix :-( (3 Replies)
Discussion started by: christallott
3 Replies
2. UNIX for Advanced & Expert Users
Hey Guyz I have a requirement something like this..
a part of file name, date of modification of that file and a text is entered as input.
like
Date : 080206 (MMDDYY format.)
filename : hotel_rates
text : Jim
now the file hotel_rates.ZZZ.123 (creation date is Aug 02 2006) should be... (10 Replies)
Discussion started by: rosh0623
10 Replies
3. Shell Programming and Scripting
Hi,
Would appreciate if someone could help me with the following requirement.
Say I have a directory where a file called abc_$timestamp.txt is created couple of times in a day.
So this directory would have files like
abc_2007-03-28-4-5-7.txt
abc_2007-03-28-3-5-7.txt... (4 Replies)
Discussion started by: hyennah
4 Replies
4. AIX
Hi guys,
I have a directory in UNIX having files with the below format, i need to pickup the latest file having recent timestamp embedded on it, then need to rename it to a standard file name.
Below is the file format:
filename_yyyymmdd.csv, i need to pick the latest and move it with the... (2 Replies)
Discussion started by: kaushik25
2 Replies
5. UNIX for Dummies Questions & Answers
Please help me out how to identify the latest file in one directory by looking at file's timestamp or datestamp. You can say using system command. Thanks (10 Replies)
Discussion started by: duke0001
10 Replies
6. Shell Programming and Scripting
Is there a way to use find command to get the latest file and cp it into a certain dir at the same try.
example find the latest file and cp to a diff dir. (5 Replies)
Discussion started by: shehzad_m
5 Replies
7. Shell Programming and Scripting
hi Friends,
In my directory i have some files. I need to find out latest modified file. Please help me.
Sreenu. (2 Replies)
Discussion started by: sreenu80
2 Replies
8. Shell Programming and Scripting
Hi All,
This is the first time I have posted to this forum so please bear with me. Thanks also advance for any help or guidance.
For a project I need to do the following.
1. There are multiple files in multiple locations so I need to find them and the location. So I had planned to use... (9 Replies)
Discussion started by: Charlie6742
9 Replies
9. UNIX for Dummies Questions & Answers
Is there a way to use the find command to recursively scan directories for files greater than 1Gb in size and print out the directory path and file name only?
Thanks in advance. (6 Replies)
Discussion started by: jimbojames
6 Replies
10. Shell Programming and Scripting
I have tried the following code and with that i couldnt achieve what i want.
#!/usr/bin/bash
find ./ -type f \( -iname "*.xml" \) | sort -n > fileList
sed -i '/\.\/fileList/d' fileList
NAMEOFTHISFILE=$(echo $0|sed -e 's/\/()$*.^|/\\&/g')
sed -i "/$NAMEOFTHISFILE/d"... (2 Replies)
Discussion started by: gold2k8
2 Replies
LEARN ABOUT DEBIAN
class::dbi::plugin::retrieveall
Class::DBI::Plugin::RetrieveAll(3pm) User Contributed Perl Documentation Class::DBI::Plugin::RetrieveAll(3pm)
NAME
Class::DBI::Plugin::RetrieveAll - more complex retrieve_all() for Class::DBI
SYNOPSIS
use base 'Class::DBI';
use Class::DBI::Plugin::RetrieveAll;
my @by_date = My::Class->retrieve_all_sorted_by("date");
# or
__PACKAGE__->retrieve_all_sort_field('date');
my @by_date = My::Class->retrieve_all;
DESCRIPTION
This is a simple plugin to a Class::DBI subclass that allows for simple sorting of the results of a retrieve_all().
There are two main ways to use this.
Firstly, we create a new method 'retrieve_all_sorted_by' which takes an argument of how to sort.
We also add a method for 'retrieve_all_sort_field' that sets a default field that any retrieve_all() will use for sorting.
METHODS
retrieve_all_sorted_by
my @by_date = My::Class->retrieve_all_sorted_by("date");
This method will be exported into the calling class, and allows for retrieving all the objects of the class, sorted by the given column.
The argument given will be passed straight through to the database 'as is', and is not checked in any way, so an error here will usually in
an error from the database, rather than Class::DBI itself.
This makes it possible to pass more complex ORDER BY clauses through:
my @by_date = My::Class->retrieve_all_sorted_by("date DESC, reference_no");
retrieve_all_sort_field
__PACKAGE__->retrieve_all_sort_field('date');
This method changes the default retrieve_all() in the Class to be auto-sorted by the field given. Again this will be passed through
directly, so you can have complex ORDER BY clauses.
AUTHOR
Tony Bowden
BUGS and QUERIES
Please direct all correspondence regarding this module to:
bug-Class-DBI-Plugin-RetrieveAll@rt.cpan.org
COPYRIGHT and LICENSE
Copyright (C) 2004-2006 Kasei. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.0 2006-01-16 Class::DBI::Plugin::RetrieveAll(3pm)