10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Very new to shell scripting. Not sure if my title is correct but I will try and explain.
Directory has 100+ files with this format, " ABCD_ABC_Abc_AB0126.abc ". When a new file gets created, the 16-19 characters in the file name gets incremented by 1. Ex...todays most recent file is... (14 Replies)
Discussion started by: askvip
14 Replies
2. Solaris
Dear,
Require a script to check :
If the file under /opt/OV/log directory has recent 5 hours(or user defined value) file generated or not
If generated then cmd to call :
opcmsg a=a o=o msg_grp=OpC msg_text="Log file didn't generated on $time" s=critical (1 Reply)
Discussion started by: mjoshi87
1 Replies
3. Shell Programming and Scripting
Hi guys,
Under my root directory there are many sub-directories which contains log file for every day of running.
How can I find , in one command only, the recent log file in each sub-directory?
For example, If I run the following:
find . -name "exp_prod_*_*_yes_*_.log" -exec ls -ltr {} \;... (12 Replies)
Discussion started by: nir_s
12 Replies
4. UNIX for Dummies Questions & Answers
Hi,
Here is my problem:
I try to write a script to find data in a file named "data" for exemple.
Let's say I am in the directory /x/y/z, there are several sub-directories in the "z" directory (each sub-directory has a file "data") and I am searching for the word "help".
So I use this... (9 Replies)
Discussion started by: StephB
9 Replies
5. Shell Programming and Scripting
I want to find the most recent file containing ' NORESETLOGS"
I'm already here but, how to sort this now in a correct way ?
By the way, my version of find does not know about 'fprint'
find . -type f -exec grep -i " NORESETLOGS" {} \; -exec ls -l {} \; | grep -vi " RESETLOGS" (5 Replies)
Discussion started by: plelie2
5 Replies
6. Shell Programming and Scripting
I have been trying to implement the following shell script --
sftp to remote server
get list of files in the directory
sftp get the most recent listed file
exit
This script will be scheduled to be executed everyday using CRON or CONTROL-M and the need is to have absolutely no human... (7 Replies)
Discussion started by: toobrown1
7 Replies
7. Shell Programming and Scripting
Hey all.. This should be simple but stoopid here can't get head around it! I have many directories, say 100 each with many files inside. I need a script to traverse through the dirs, find most recent file in each dir and add it to a tar file.
I can find the files with something like
for... (1 Reply)
Discussion started by: bobdung
1 Replies
8. Shell Programming and Scripting
Hi people,
Please some help over here.
I have logs in a directory, in which I need to get the most recent file in order to put it within other command.
The format of the files are
loadfiles20090308094339_41
loadfiles20090308094418_42
loadfiles20090308095457_43... (4 Replies)
Discussion started by: cgkmal
4 Replies
9. Shell Programming and Scripting
Hi,
I have files coming in every day with that days timestamp like:
nameyyyymmddhhmmss.ext.
I need the most recent one and so i am using
cat `ls -t name*|head -1 ` > temp
i am sorting the files in the decending order and am copying the most recent one into a temp file.
It works at times... (3 Replies)
Discussion started by: anujairaj
3 Replies
10. Shell Programming and Scripting
OK, I know next to nothing about scripting in unix, and at the moment I don't have access to a unix environment...
We have an application that generates a text report file which is later printed. The format is this:
bbtptcYYMMDDSSCC.txt (year/month/day/second/check digit)
I want a... (1 Reply)
Discussion started by: josborn777
1 Replies