Sponsored Content
Full Discussion: mtime command erroring
Operating Systems AIX mtime command erroring Post 302464156 by javeedkaleem on Tuesday 19th of October 2010 11:47:22 AM
Old 10-19-2010
Network mtime command erroring

I am calling this paramters from a controlfile

Code:
CONTROLFILE="/u01/scripts/admin/filesystem.ctl"
SEARCH_PATH="`grep SEARCH_PATH $CONTROLFILE | awk -F: '{print $2}' `"
FILE_TYPE="`grep FILE_TYPE $CONTROLFILE | awk -F: '{print $2}' `"
DEL_RETENTION_SIZE="`grep DEL_RETENTION_SIZE $CONTROLFILE | awk -F: '{print $2}' `"

find $SEARCH_PATH/$FILE_TYPE -mtime +$DEL_RETENTION_SIZE

getting this error.

Code:
[oracle@jk1] $ find $SEARCH_PATH/$FILE_TYPE -mtime +$DEL_RETENTION_SIZE
find: 0652-086 Specify a decimal integer for -mtime
Usage: find [-H | -L] Path-list [Expression-list]

when running like this its running without issues
Code:
find $SEARCH_PATH/$FILE_TYPE -mtime +10

Moderator's Comments:
Mod Comment Use code tags please - you got a PM that explains how to use them.

Last edited by zaxxon; 10-22-2010 at 04:33 AM.. Reason: User ignored request to change topic - so I did that
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need a help in the Shell script which is erroring out

Hi all I want to add this line after a line This is the line which needs to be add after the word permission echo 'profile: /export/home/unix1/auto.pr' >> $xxyy if ;then cd $unixserv/unix sed ' /permission/ a\ echo 'profile: /export/home/unix1/auto.pr' >> $xxyy... (13 Replies)
Discussion started by: ranga27
13 Replies

2. UNIX for Dummies Questions & Answers

Problem with find command when used with mtime

All, Please find the below comand . I am trying to list the file that has not been accesed is past 14 days . But when you look at the display the directory "crecv1" which has date as today is displayed .. Why it is happening . I send this code instead of ls -ltr as rm -f -r in production... (4 Replies)
Discussion started by: arunkumar_mca
4 Replies

3. UNIX for Advanced & Expert Users

DISPLAY variable erroring when installing Oracle 10g.

Hi, I'm trying to install Oracle 10g in Solaris 10. As required in the instructions, I set the DISPLAY variable: $ DISPLAY=192.168.150.128:0.0 ; export DISPLAY when run the runInstaller in a terminal, it displays an error related to DISPLAY variable. :( Any ideas?? Thanks. (2 Replies)
Discussion started by: ffpradella
2 Replies

4. Shell Programming and Scripting

1 script 8 boxes and it is erroring on 3 of them

am trying to place a script from one hp11-unix box (where it works) onto three others where it won't. I am using csh and in the script I use the lines set F_SYSTEMS=(/dbs01 /dbs02 /dbm01 /dbm02 /ora_home/app/oracle) on this one the three others throw up on pulling the files. there should be... (2 Replies)
Discussion started by: cat55
2 Replies

5. UNIX for Dummies Questions & Answers

(find) mtime vs. (unix) mtime

Hi I've made some test with perl script to learn more about mtime... So, my question is : Why the mtime from findfind /usr/local/sbin -ctime -1 -mtime -1 \( -name "*.log" -o -name "*.gz" \) -print are not the same as mtime from unix/linux in ls -ltr or in stat() function in perl : stat -... (2 Replies)
Discussion started by: hiddenshadow
2 Replies

6. Shell Programming and Scripting

What is -mtime 0 in find command?

What is "-mtime 0" option in find command. Does it consider the files that are of today lets say today is 4th Aug or will include files 24 hrs past from the current time???? (3 Replies)
Discussion started by: sachinkl
3 Replies

7. Red Hat

-mtime command

Hello, what this command do. find /oracle/u01/app/oracle/admin/rdz/udump/ -name "*.trc" -mtime +1 Thanks, Umair (1 Reply)
Discussion started by: umair
1 Replies

8. Shell Programming and Scripting

awk problem - erroring out - unexpected token

can anyone help identify where the issue is here? awk 'BEGIN { c="perl -e 'print scalar(localtime("'${EPOCHTIME}'")), "\n"'"; c|getline; close( c ); print $2" "$3" "$4" "$6; }' bash: syntax error near unexpected token `(' can't seem to figure it out. i tried this: awk 'BEGIN {... (5 Replies)
Discussion started by: SkySmart
5 Replies

9. UNIX for Advanced & Expert Users

Passing Variable in -mtime command

Hi, As the process of log cleanup, Im using the below command find $DIR -mtime +3 -type f -exec gzip {} \; The problem is I want to pass +3 as variable in my unix shell. I have defined ZPDATE=+3 in my properties file and calling this property file in my script. If i try the... (6 Replies)
Discussion started by: Deena1984
6 Replies

10. AIX

AIX - find command with mtime

Hello experts, I would get from a list of files, which are more ancient than 1 hour. Examples: Current date: Wed Oct 28 16:10:02 SAT 2015 using: find path -name 'file_name. *' -mtime +0 I see files with less at 00:00:00 date of the current day. /path/file_name.20151027170725... (7 Replies)
Discussion started by: carlino70
7 Replies
ZGREP(1)						      General Commands Manual							  ZGREP(1)

NAME
zgrep - search possibly compressed files for a regular expression SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code: (-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If the GREP environment variable is set, zgrep uses it as the grep program to be invoked. EXIT CODE
2 - An option that is not supported was specified. AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1) ZGREP(1)
All times are GMT -4. The time now is 06:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy