07-10-2001
No, the syntax is correct and works fine for me - in addition srolen wants files not only 90 days old, but files 90 days old and OLDER and hence +90 is needed. It is an "-" before the mtime, just like all other condition statement flags that work with find.
However you have introduced a more efficient means of doing this using xargs since -exec spawns a new process for each file it finds, whereas the former collects the files as multiple arguments to the rm (or whatever else) command.
Regards.
Last edited by alwayslearningunix; 07-10-2001 at 10:58 AM..
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I create a file touch 1201093003 fichcomp
and inside a repertory (which hava a lot of files) I want to list all files created before this file :
find *.* \! -maxdepth 1 - newer fichcomp but this command returned bash: /usr/bin/find: Argument list too long
but i make a filter all... (1 Reply)
Discussion started by: yacsil
1 Replies
2. UNIX for Advanced & Expert Users
It has happended twice the past 3 months. The find command which is the standard part of unix accounting script "dodisk", which searches directories to find out how much disk space a user has used.
On a particular cluster of 6 servers, several file systems, the find command has twice used all... (2 Replies)
Discussion started by: scottman
2 Replies
3. Solaris
In linux df is the command to find free space what is the equivalent command in the Solaris (2 Replies)
Discussion started by: harishankar
2 Replies
4. Shell Programming and Scripting
Yes , I have to find a file in unix without using any find or where commands.Any pointers for the same would be very helpful as i am beginner in shell scritping and need a solution for the same.
Thanks in advance.
Regards
Jatin Jain (10 Replies)
Discussion started by: jatin.jain
10 Replies
5. UNIX for Advanced & Expert Users
Hi,
I need a command to find the Hardware Model in Solaris 8,9,10,11. The command which I am using right now is:
/usr/platform/`uname -i`/sbin/prtdiag
The problem is in this output:-
System Configuration: Sun Microsystems sun4u Netra T1 200 (UltraSPARC-IIe 500MHz)
Here I am... (1 Reply)
Discussion started by: vineetd
1 Replies
6. Linux
Hi,
I'm using the following command to find the multiple requierd file types and its working fine
find . -name "*.pl" -o -name "*.pm" -o -name "*.sql" -o -name "*.so" -o -name "*.sh" -o -name "*.java" -o -name "*.class" -o -name "*.jar" -o -name "*.gz" -o -name "*.Z" -type f
Though... (2 Replies)
Discussion started by: vickramshetty
2 Replies
7. Shell Programming and Scripting
Hi all ,
I'm new to unix
I have a checked project , there exists a file called xxx.config .
now my task is to find all the files in the checked out project which references to this xxx.config file.
how do i use grep or find command . (2 Replies)
Discussion started by: Gangam
2 Replies
8. Solaris
Hello,
I am running some performance based tests on Solaris, and I was wondering how fast the "seeking" rate of Solaris is, or how fast Solaris can get information about files with the "find" command. Does anyone know what 'find' command I could run to traverse through my system to see the rate... (1 Reply)
Discussion started by: bstring
1 Replies
9. Shell Programming and Scripting
Hi,
I am looking for a generic find command that works on both Linux and Solaris.
I have the below command that works fine on Linux but fails on solaris.find /web/config -type f '(' -name '*.txt' -or -name '*.xml' -name '*.pro' ')' Fails on SunOS mysolaris 5.10 Generic_150400-61 sun4v sparc... (1 Reply)
Discussion started by: mohtashims
1 Replies
LEARN ABOUT ULTRIX
crontab
crontab(5) File Formats Manual crontab(5)
Name
crontab - clock daemon table file
Syntax
/usr/lib/crontab
Description
The command executes at specified dates and times according to the instructions in the file. The file consists of lines with six fields
each. The format for a line is as follows:
minute hour day month weekday command
The following list defines each field in the line:
minute (0-59) The exact minute that the command sequence executes.
hour (0-23) The hour of the day that the command sequence executes.
day (1-31) The day of the month that the command sequence executes.
month (1-12) The month of the year that the command sequence executes.
weekday (1-7) The day of the week that the command sequence executes. Monday = 1, Tuesday = 2, and so forth.
command The complete command sequence variable that is to be executed. Note that the command string must conform to Bourne shell
syntax.
The first five integer fields may be specified as follows:
o A single number in the specified range
o Two numbers separated by a minus, meaning a range inclusive
o A list of numbers separated by commas, meaning any of the numbers
o An asterisk meaning all legal values
The sixth field is a string that is executed by the shell at the specified times. A percent sign (%) in this field is translated to a new-
line character. Only the first line of the command field, up to a percent sign (%) or end of line, is executed by the shell. The other
lines are made available to the command as standard input.
Examples
The following example is part of a file:
# periodic things
0,15,30,45 * * * * (echo '^M' `date`; echo '') >/dev/console
0,15,30,45 * * * * /usr/lib/atrun
# daily stuff
5 4 * * * sh /usr/adm/newsyslog
15 4 * * * ( cd /usr/preserve; find . -mtime +7 -a -exec rm -f {} ; )
20 4 * * * find /usr/msgs -mtime +21 -a ! -perm 444 -a ! -name bounds
-a -exec rm -f {} ;
# NOTE: The above line is wrapped.
# local cleanups
30 4 * * * find /usr/spool/mqueue -type f -mtime +5 -name df-exec rm {} ;
35 4 * * * find /usr/spool/mqueue -type f -mtime +5 -name tf-exec rm {} ;
40 4 * * * find /usr/spool/rwho -type f -mtime +21 -exec rm {} ;
#
# redirecting error output
0 17 * * 1,3,5 /bin/tar -cv /usr/sysads/smith > /dev/console 2>&1
#
Files
See Also
sh(1), cron(8)
Guide to System Environment Setup
crontab(5)