05-27-2011
Help with finding correct log files
Lets say i have files like the following format :-
R0001.log
R0002.log
...
...
R00011.log
upto R000n.log, there are also a lot of text files with different names
now how can i find these files with in a range, i can do "ls R000*.log" and it will show me all the R000*.log files but what if i want files between R0005 and R00010
I can also use find . -name R000*.log but then how can i use the range here...
Now, once i get those files, i want to copy only these files within this range...
Please help me getting this done... Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern.
Note:These are the samples of two files,but i can have more... (2 Replies)
Discussion started by: jerome Sukumar
2 Replies
2. UNIX for Advanced & Expert Users
I'm trying to read the output of a .sql script (simple insert and commit oracle pl/slq script) to a log file using a shell script. My problem is I end up with a log file that looks like this:
sd12@phenix97:/detain/sd12/logs > cat 20071205_detain_20071206.log
12320496 rows created. Commit... (11 Replies)
Discussion started by: sd12
11 Replies
3. Solaris
Hi All,
I have a perl module TrxLog.pm and following are codes in it
#!/usr/local/bin/perl
package TrxLog;
%log_begin="";
%log_end="";
%log_msg="";
%log_start_time="";
%log_end_time="";
$ix=0;
@arr_msg="";
if (! -e "TrxLog.txt"){
open (TRX,">TrxLog.txt");
}else{
... (1 Reply)
Discussion started by: megh
1 Replies
4. Shell Programming and Scripting
I have directories like V00R01,V00R02,V01R01,V01R02 in a directory
where V is version and R is a release. basically I need to set base directory and current directory. Under a version there can be any number of releases and there can be number of versions also.
V00R01...V00R50..so on
also,... (2 Replies)
Discussion started by: vjasai
2 Replies
5. HP-UX
I am using hp ux 11.31
Our SAN storage is being presented from an IBM XIV.
We have 3 HP servers (rx4640's), and the XIV has them setup in a cluster, so that when a disk is presented all 3 servers can see the new LUN.
I'm setting up a new VM on one of the HP servers. I have allocated a 34Gb... (1 Reply)
Discussion started by: xtoverus1
1 Replies
6. Shell Programming and Scripting
Hello,
I have two files A and B .A file consist of the words that user will put whereas file B consist of all user's LDAP a/c.I want here that if user don't mention LDAP a/c in comment than it will exit otherwise success.
File A.I have a solution that I will modify the file A ...just save the... (9 Replies)
Discussion started by: anuragpgtgerman
9 Replies
7. Shell Programming and Scripting
I've a series of words in the format "abc0001d" till "abc1999d".
I would like to use delimiter to cut the word from abc0001s to two words:
abc00 and 01d. Help me in finding the correct delimiter to cut in desired way. (7 Replies)
Discussion started by: surdileep
7 Replies
8. Shell Programming and Scripting
Hi,
I'm trying to use perl to generate files based on sections in a large textfile.
This will create one file per section that starts with " ABC_":
perl -n -e '/^ABC_/ and open FH, ">output_".$n++; print FH;' largefile.txt
However, the output filenames will be on the form output_nn. This... (2 Replies)
Discussion started by: Yagi Uda
2 Replies
9. Shell Programming and Scripting
Is there a general way I can use so as to process paths/files from your terminal without the need to backslash things?
Till recently I used to use
touch "file_here"
but it does not work if file_here contains any of the characters ` and ", I still need to backslash them if I want to make the... (1 Reply)
Discussion started by: hakermania
1 Replies
10. Shell Programming and Scripting
I have logs files which are generated each day depending on how many processes are running. Some days it could spin up 30 processes. Other days it could spin up 50. The log files all have the same pattern with the number being the different factor. e.g.
LOG_FILE_1.log
LOG_FILE_2.log etc etc
... (2 Replies)
Discussion started by: atelford
2 Replies
kclog(1M) kclog(1M)
NAME
kclog - manage kernel configuration log file
SYNOPSIS
config] string] type] name] [count]
comment
DESCRIPTION
is the administrative command for the HP-UX kernel configuration log file. The log file is automatically maintained by all of the kernel
configuration commands (and Any change to any kernel configuration gets logged to this log file, which is located at Note that this file is
a plain text file which can be viewed and manipulated using standard Unix file management commands; exists simply for convenience in find-
ing particular log file entries.
Under normal usage, prints the last count entries in the log file. When one of the options is specified, prints the last count entries
that match the specified criteria. If count is not specified, it defaults to 1.
Options
will print all entries matching criteria. If this option is not specified,
will only print the last count entries that match the specified criteria.
will print only log file entries describing changes to the saved
kernel configuration named config. If this option is not specified, will print log file entries describing changes to any
saved or running kernel configuration.
will not print any entries. Instead,
will create a new entry, as if a kernel configuration change had been made, containing the specified comment. This option
is only allowed for users with appropriate privileges.
will print only log file entries that contain the given
string.
will print only log file entries that refer to a configuration object
(module or tunable) of the given name.
will print only log file entries that refer to configuration objects
of the specified type: or
RETURN VALUE
returns zero for success. It returns non-zero and prints a diagnostic message if an error occurs.
EXAMPLES
To see the last three entries in the log:
To see the last entry for the tunable
To see the last five entries for module changes:
To see all entries for module changes:
To see the last entry mentioning Aberdeen:
WARNINGS
The format of the log file may be changed without notice.
Some configuration changes can be made without using the kernel configuration commands. No log file entries are made for such changes.
The log file should not be manually edited. Doing so may cause to behave unpredictably.
SEE ALSO
kcmodule(1M), kconfig(1M), kctune(1M), kconfig(5).
available on
kclog(1M)