01-30-2006
I think the parameter
sort -k6M,6M
will sort the date month format as Jan, Feb, Mar,... in the ascending order. This what the man page says for the -M option. If that's not the case, please let me know.
I am using Sun Solaris 5.8
Thanks.
Rahul.
Last edited by rahulrathod; 01-30-2006 at 12:26 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm writing a script to find the oldest file in a directory. I know this can be done by using ls -rt | tail -1 but these are rather large directories and that can be somewhat slow since the script will be running constantly.
Are there any other ways to do this that would be faster? I looked to... (2 Replies)
Discussion started by: bergerj3
2 Replies
2. Shell Programming and Scripting
Hi all,
I need your assistance in removing the oldest file in a directory.
I posted the same thread 3 days back and I got the following answer
ls -1 -t | tail -1 | xargs rm
which is not covering the case when there are directories older than the oldest file.
So, could you please... (2 Replies)
Discussion started by: pavan_movva
2 Replies
3. Shell Programming and Scripting
Hi, Please help me out
I want to grep the oldest file in a directory,
could I use "ls" command?
and how?
thanx in advance (1 Reply)
Discussion started by: ericaworld
1 Replies
4. Shell Programming and Scripting
I am using a bash script to perform some automated maintenance on files in a directory. When I run the script using $sh -x script.sh <directory> the script works fine. It sets the variable to the oldest file, and continues on. However when I run the script like this $./script.sh <directory>, it... (5 Replies)
Discussion started by: spaceherpe61
5 Replies
5. Shell Programming and Scripting
Hi all,
I am a newbie to scripting and I need your help regarding finding the oldest file in a particular directory. My intention is to remove that oldest file.
Are there any options available with the "find" command to do this..
Thanks in advance for your help
Pavan (4 Replies)
Discussion started by: pavan_movva
4 Replies
6. UNIX and Linux Applications
I am trying to determine the oldest and most recent files in a huge directory. I am using an ls -tr statement outside my find statement. The directory is too big and I am getting an "arg list too long" error. Is there something I can put in my find statement that doesn't create a list to... (2 Replies)
Discussion started by: hiyofjord
2 Replies
7. Shell Programming and Scripting
Hey! I have found similar posts both here and on other sites regarding this, but I cannot seem to get my script to work. I want to delete the oldest file in a test directory if there are more than two files. My script is currently:
#!/bin/bash
MEPATH=/usr/local/bin/test
FILECOUNT=`ls... (4 Replies)
Discussion started by: Immolation
4 Replies
8. Shell Programming and Scripting
I'm using a directory naming convention to organize files as exemplified here:
2012/Aug/week-20-Aug/23-Thu/tuv.txt
2012/Aug/week-27-Aug/30-Thu/abc.txt
2012/Sep/week-27-Aug/01-Sat/def.txt
2012/Sep/week-03-Sep/07-Fri/xyz.txt
How do I write a command that will list the file names abc.txt and... (4 Replies)
Discussion started by: siegfried
4 Replies
9. UNIX for Dummies Questions & Answers
Hi,
My apologies if my query is already available on this forum but I am new and could not find.
I need a script to list all directories/sub directories and files with permissions/groups/owners. The script would run from home directory and should capture every directory. How do I do this?
... (4 Replies)
Discussion started by: 8709711
4 Replies
10. UNIX for Dummies Questions & Answers
Hi
I am unable to find files, those are present anywhere in the same directory tree, based on the creation date. I need to find the files with their path, as I need to create them in another location and move them. I need some help with a script that may do the job.
Please help (2 Replies)
Discussion started by: sam192837465
2 Replies
LEARN ABOUT REDHAT
namazu
NAMAZU(1) Namazu Project NAMAZU(1)
NAME
namazu - a search program of Namazu
SYNOPSIS
namazu [options] <query> [index]...
DESCRIPTION
namazu 2.0.9, a search program of Namazu.
-n, --max=NUM
set number of documents shown to NUM.
-w, --whence=NUM
set first number of documents shown to NUM.
-l, --list
print results by listing format.
-s, --short
print results by short format.
--result=EXT
set NMZ.result.EXT for printing results.
--late sort documents in late order.
--early
sort documents in early order.
--sort=METHOD
set a sort METHOD (score, date, field:name)
--ascending
sort in ascending order (default: descending)
-a, --all
print all results.
-c, --count
print only number of hits.
-h, --html
print in HTML format.
-r, --no-references
do not display reference hit counts.
-H, --page
print further result links. (nearly meaningless)
-F, --form
force to print <form> ... </form> region.
-R, --no-replace
do not replace URI string.
-U, --no-decode-uri
do not decode URI when printing in a plain format.
-o, --output=FILE
set the output file name to FILE.
-f, --config=FILE
set the config file name to FILE.
-C, --show-config
print current configuration.
-q, --quiet
do not display extra messages except search results.
-d, --debug
be debug mode.
-v, --version
show the version of namazu and exit.
--help show this help and exit
REPORTING BUGS
Report bugs to <bug-namazu@namazu.org>.
COPYRIGHT
Copyright (C) 1997-1999 Satoru Takabayashi All rights reserved.
Copyright (C) 2000,2001 Namazu Project All rights reserved.
This 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, 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 MER-
CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
namazu of Namazu 2.0.9 November 2001 NAMAZU(1)