06-14-2010
did you try the -mtime -1 option on find?
10 More Discussions You Might Find Interesting
1. Programming
Hi,
what is the command in unix to find a file abc.c in a directory which had n number of sub-directories.
thanx (3 Replies)
Discussion started by: jazz
3 Replies
2. Shell Programming and Scripting
Hello All,
I am somehow stumped with this ting.
'Find' will sure show me.. but I want only thepath of all the occurences of the file in any of the sub-dirs..
Any help will be sincerely appreciated.
thanx! (3 Replies)
Discussion started by: pranavagarwal
3 Replies
3. 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
4. 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
5. 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
6. Shell Programming and Scripting
for x in `find /vmfs/volumes/v01tstn01a01/ -type d`; do find $x -name '*.vmx' > /dev/null || echo $x; done;
The goal of this is to find the subdirectories that do NOT contain a file with the extension of .vmx
Any help would be great! (6 Replies)
Discussion started by: hodnov
6 Replies
7. Shell Programming and Scripting
I'm having problems figuring out the process to find directories that DO NOT contain a certain file. I have a mp3 collection that all the album art is name "folder.jpg". Not all the albums have images. I need a way to find the albums/directories that do not contain "folder.jpg". I can find the... (2 Replies)
Discussion started by: subsonic
2 Replies
8. UNIX for Dummies Questions & Answers
Hi
Need help for the following scenario.
I am having two directories /tmp/a and /tmp/b. /tmp/a again has subdirectories /tmp/a/aa and /tmp/a/ab.
I want to run a script from /tmp/b to search for a file user.lst in the folders /tmp/a/aa and /tmp/a/ab, if available, i want to make a file in... (3 Replies)
Discussion started by: sudeep.id
3 Replies
9. 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
10. Shell Programming and Scripting
Hi,
I need to find the most recent files by their name from an X repertoire.
The problem is that the name of the files is of type:
POWERL10_20151203000.xml
POWERL10_20151203001.xml
POWERL10_20151202000.xml
FIXED VALUE_DATENNN.xml
NNN = Sequential number
I would need to recover the... (4 Replies)
Discussion started by: verita
4 Replies
LEARN ABOUT OSF1
strclean
strclean(8) System Manager's Manual strclean(8)
NAME
strclean - Removes outdated STREAMS error log files
SYNOPSIS
/usr/sbin/strclean [-d logdir] [-a age]
FLAGS
Specifies a maximum age in days for the STREAMS error log files if this not the default age of 3. The value of age must be an integer
greater than or less than 3. Specifies a directory for the location of the STREAMS error log files to be removed if this is not the
default directory /var/adm/streams.
DESCRIPTION
The strclean command cleans the STREAMS error logger directory of log files (error.mm-dd) that contain error messages sent by the STREAMS
log driver (strlog). If no other directory is specified (the logdir argument), the command removes error log files in the /var/adm/streams
directory. If no other age is specified (the age argument), the command removes error log files that have not been modified in 3 days.
The strclean command is executed by the cron daemon on a periodic basis.
EXAMPLES
To remove the day-old error log files from a directory called /tmp/streams, enter: strclean -d /tmp/streams -a 1
FILES
One or more error log file or files on which strclean operates. The mm.dd in the filename indicates the month and day of the messages con-
tained in the file.
RELATED INFORMATION
Commands: strerr(8), cron(8).
Interfaces: strlog(7). delim off
strclean(8)